mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
vmscan: cleanup the scan batching code
The vmscan batching logic is twisting. Move it into a standalone function nr_scan_try_batch() and document it. No behavior change. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Acked-by: Rik van Riel <riel@redhat.com> Cc: Nick Piggin <npiggin@suse.de> Cc: Christoph Lameter <cl@linux-foundation.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
56e49d2188
commit
6e08a369ee
4 changed files with 35 additions and 18 deletions
|
|
@ -334,9 +334,9 @@ struct zone {
|
|||
|
||||
/* Fields commonly accessed by the page reclaim scanner */
|
||||
spinlock_t lru_lock;
|
||||
struct {
|
||||
struct zone_lru {
|
||||
struct list_head list;
|
||||
unsigned long nr_scan;
|
||||
unsigned long nr_saved_scan; /* accumulated for batching */
|
||||
} lru[NR_LRU_LISTS];
|
||||
|
||||
struct zone_reclaim_stat reclaim_stat;
|
||||
|
|
|
|||
Loading…
Reference in a new issue