]> git.baikalelectronics.ru Git - kernel.git/commit
vmscan: handle isolated pages with lru lock released
authorHillf Danton <dhillf@gmail.com>
Wed, 21 Mar 2012 23:34:02 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 00:54:57 +0000 (17:54 -0700)
commit4ea688c423af06e1fe1d0808680f7733cd97d7d0
treeac3c870c1885337e340d807cd8b5dc0ad8eb0315
parent9ee839dbb8a5fa0227baa4f1338af68f782898fe
vmscan: handle isolated pages with lru lock released

When shrinking inactive lru list, isolated pages are queued on locally
private list, so the lock-hold time could be reduced if pages are counted
without lock protection.

To achieve that, firstly updating reclaim stat is delayed until the
putback stage, after reacquiring the lru lock.

Secondly, operations related to vm and zone stats are now proteced with
preemption disabled as they are per-cpu operations.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c