]> git.baikalelectronics.ru Git - kernel.git/commit
mm: move pagevec stripping to save unlock-relock
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 31 Mar 2009 22:23:12 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:13 +0000 (08:59 -0700)
commitcc61265cc7dc6da225ad4a5d4f13bc323d22673f
tree3be4cdc338bf004f7b8c6c70baf7fb78ad252844
parentd2266b4a502f828752b971805f6a6660a2dba88c
mm: move pagevec stripping to save unlock-relock

In shrink_active_list() after the deactivation loop, we strip buffer heads
from the potentially remaining pages in the pagevec.

Currently, this drops the zone's lru lock for stripping, only to reacquire
it again afterwards to update statistics.

It is not necessary to strip the pages before updating the stats, so move
the whole thing out of the protected region and save the extra locking.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: MinChan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c