* vmscan: protect zone rotation stats by lru lock
@ 2008-11-30 18:17 Johannes Weiner
2008-11-30 21:51 ` Rik van Riel
2008-12-01 0:01 ` KOSAKI Motohiro
0 siblings, 2 replies; 3+ messages in thread
From: Johannes Weiner @ 2008-11-30 18:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: Rik van Riel, linux-mm
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1243,32 +1243,32 @@ static void shrink_active_list(unsigned
/* page_referenced clears PageReferenced */
if (page_mapping_inuse(page) &&
page_referenced(page, 0, sc->mem_cgroup))
pgmoved++;
list_add(&page->lru, &l_inactive);
}
+ spin_lock_irq(&zone->lru_lock);
/*
* Count referenced pages from currently used mappings as
* rotated, even though they are moved to the inactive list.
* This helps balance scan pressure between file and anonymous
* pages in get_scan_ratio.
*/
zone->recent_rotated[!!file] += pgmoved;
/*
* Move the pages to the [file or anon] inactive list.
*/
pagevec_init(&pvec, 1);
pgmoved = 0;
lru = LRU_BASE + file * LRU_FILE;
- spin_lock_irq(&zone->lru_lock);
while (!list_empty(&l_inactive)) {
page = lru_to_page(&l_inactive);
prefetchw_prev_lru_page(page, &l_inactive, flags);
VM_BUG_ON(PageLRU(page));
SetPageLRU(page);
VM_BUG_ON(!PageActive(page));
ClearPageActive(page);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vmscan: protect zone rotation stats by lru lock
2008-11-30 18:17 vmscan: protect zone rotation stats by lru lock Johannes Weiner
@ 2008-11-30 21:51 ` Rik van Riel
2008-12-01 0:01 ` KOSAKI Motohiro
1 sibling, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2008-11-30 21:51 UTC (permalink / raw)
To: Johannes Weiner; +Cc: Andrew Morton, linux-mm
Johannes Weiner wrote:
> Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
That wants a commit message. Otherwise,
Acked-by: Rik van Riel <riel@redhat.com>
--
All rights reversed.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vmscan: protect zone rotation stats by lru lock
2008-11-30 18:17 vmscan: protect zone rotation stats by lru lock Johannes Weiner
2008-11-30 21:51 ` Rik van Riel
@ 2008-12-01 0:01 ` KOSAKI Motohiro
1 sibling, 0 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2008-12-01 0:01 UTC (permalink / raw)
To: Johannes Weiner; +Cc: kosaki.motohiro, Andrew Morton, Rik van Riel, linux-mm
> + spin_lock_irq(&zone->lru_lock);
> /*
> * Count referenced pages from currently used mappings as
> * rotated, even though they are moved to the inactive list.
> * This helps balance scan pressure between file and anonymous
> * pages in get_scan_ratio.
> */
> zone->recent_rotated[!!file] += pgmoved;
>
> /*
> * Move the pages to the [file or anon] inactive list.
> */
> pagevec_init(&pvec, 1);
>
> pgmoved = 0;
> lru = LRU_BASE + file * LRU_FILE;
> - spin_lock_irq(&zone->lru_lock);
> while (!list_empty(&l_inactive)) {
> page = lru_to_page(&l_inactive);
I think this patch is needed for 2.6.28.
please CC to lkml and linus at your next post.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-01 0:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-30 18:17 vmscan: protect zone rotation stats by lru lock Johannes Weiner
2008-11-30 21:51 ` Rik van Riel
2008-12-01 0:01 ` KOSAKI Motohiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox