aboutsummaryrefslogtreecommitdiff
path: root/include/linux/vcodec/vcodec_log.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@google.com>2015-06-04 16:41:16 -0400
committerMister Oyster <oysterized@gmail.com>2017-05-27 19:40:06 +0200
commit5b75d4be5774254911d41cd1ae1416b456236fac (patch)
tree7de3160b4dae60c67818d65ccb7675f69b619fcc /include/linux/vcodec/vcodec_log.h
parentbf6b5cc9385ab89fe60ffce39d4453d81ad6fa9c (diff)
ext4 crypto: allocate bounce pages using GFP_NOWAIT
Previously we allocated bounce pages using a combination of alloc_page() and mempool_alloc() with the __GFP_WAIT bit set. Instead, use mempool_alloc() with GFP_NOWAIT. The mempool_alloc() function will try using alloc_pages() initially, and then only use the mempool reserve of pages if alloc_pages() is unable to fulfill the request. This minimizes the the impact on the mm layer when we need to do a large amount of writeback of encrypted files, as Jaeguk Kim had reported that under a heavy fio workload on a system with restricted amounts memory (which unfortunately, includes many mobile handsets), he had observed the the OOM killer getting triggered several times. Using GFP_NOWAIT If the mempool_alloc() function fails, we will retry the page writeback at a later time; the function of the mempool is to ensure that we can writeback at least 32 pages at a time, so we can more efficiently dispatch I/O under high memory pressure situations. In the future we should make this be a tunable so we can determine the best tradeoff between permanently sequestering memory and the ability to quickly launder pages so we can free up memory quickly when necessary. Change-Id: I3dbb5eb9a3aa04f40e551338eee5e8d06f352fe8 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/vcodec/vcodec_log.h')
0 files changed, 0 insertions, 0 deletions