login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
7
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Minchan Kim
Subject:
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
Date: Tuesday, December 7, 2010 - 8:21 am
On Tue, Dec 07, 2010 at 04:05:25PM +0100, Johannes Weiner wrote:
quoted text
> On Mon, Dec 06, 2010 at 02:29:12AM +0900, Minchan Kim wrote: > > --- a/mm/swap.c > > +++ b/mm/swap.c > > @@ -275,26 +275,59 @@ void add_page_to_unevictable_list(struct page *page) > > * head of the list, rather than the tail, to give the flusher > > * threads some time to write it out, as this is much more > > * effective than the single-page writeout from reclaim. > > + * > > + * If the page isn't page_mapped and dirty/writeback, the page > > + * could reclaim asap using PG_reclaim. > > + * > > + * 1. active, mapped page -> none > > + * 2. active, dirty/writeback page -> inactive, head, PG_reclaim > > + * 3. inactive, mapped page -> none > > + * 4. inactive, dirty/writeback page -> inactive, head, PG_reclaim > > inactive, clean -> inactive, tail
Indeed. I missed it.
quoted text
> > > + * 5. Others -> none > > + * > > + * In 4, why it moves inactive's head, the VM expects the page would > > + * be write it out by flusher threads as this is much more effective > > + * than the single-page writeout from reclaim. > > */ > > static void lru_deactivate(struct page *page, struct zone *zone) > > { > > int lru, file; > > + bool active; > > > > - if (!PageLRU(page) || !PageActive(page)) > > + if (!PageLRU(page)) > > return; > > > > /* Some processes are using the page */ > > if (page_mapped(page)) > > return; > > > > + active = PageActive(page); > > + > > file = page_is_file_cache(page); > > lru = page_lru_base_type(page); > > - del_page_from_lru_list(zone, page, lru + LRU_ACTIVE); > > + del_page_from_lru_list(zone, page, lru + active); > > ClearPageActive(page); > > ClearPageReferenced(page); > > add_page_to_lru_list(zone, page, lru); > > - __count_vm_event(PGDEACTIVATE); > > > > + if (PageWriteback(page) || PageDirty(page)) { > > + /* > > + * PG_reclaim could be raced with end_page_writeback > > + * It can make readahead confusing. But race window > > + * is _really_ small and it's non-critical problem. > > + */ > > + SetPageReclaim(page); > > + } else { > > + /* > > + * The page's writeback ends up during pagevec > > + * We moves tha page into tail of inactive. > > + */ > > + list_move_tail(&page->lru, &zone->lru[lru].list); > > + mem_cgroup_rotate_reclaimable_page(page); > > I think you also need to increase PGROTATED here.
Absolutely. Thanks, Hannes. :)
quoted text
> > Other than that, > Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
-- Kind regards, Minchan Kim --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH v4 0/7] f/madivse(DONTNEED) support
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 1/7] Fix checkpatch's report in swap.c
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 3/7] move memcg reclaimable page into tail of in ...
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 5/7] add profile information for invalidated pag ...
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 6/7] Remove zap_details NULL dependency
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 7/7] Prevent activation of page in madvise_dontneed
, Minchan Kim
, (Sun Dec 5, 10:29 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, KAMEZAWA Hiroyuki
, (Sun Dec 5, 5:04 pm)
Re: [PATCH v4 1/7] Fix checkpatch's report in swap.c
, Rik van Riel
, (Sun Dec 5, 6:47 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Rik van Riel
, (Sun Dec 5, 8:04 pm)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, Rik van Riel
, (Sun Dec 5, 8:24 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Rik van Riel
, (Sun Dec 5, 8:25 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Balbir Singh
, (Sun Dec 5, 8:34 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Mel Gorman
, (Mon Dec 6, 7:53 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Minchan Kim
, (Mon Dec 6, 5:17 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Minchan Kim
, (Mon Dec 6, 5:20 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Hugh Dickins
, (Mon Dec 6, 9:26 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Hugh Dickins
, (Mon Dec 6, 9:48 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Minchan Kim
, (Mon Dec 6, 10:30 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Minchan Kim
, (Mon Dec 6, 10:44 pm)
Re: [PATCH v4 1/7] Fix checkpatch's report in swap.c
, Johannes Weiner
, (Tue Dec 7, 7:37 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 7:49 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Johannes Weiner
, (Tue Dec 7, 7:52 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Johannes Weiner
, (Tue Dec 7, 8:05 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 8:07 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 8:19 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Tue Dec 7, 8:21 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 8:26 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 8:56 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 3:51 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, KAMEZAWA Hiroyuki
, (Tue Dec 7, 5:56 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 6:43 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, KAMEZAWA Hiroyuki
, (Tue Dec 7, 6:56 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 7:15 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Balbir Singh
, (Tue Dec 7, 11:56 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Hugh Dickins
, (Wed Dec 8, 12:26 am)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Minchan Kim
, (Wed Dec 8, 12:55 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:02 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, KOSAKI Motohiro
, (Wed Dec 8, 1:04 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:08 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, Minchan Kim
, (Wed Dec 8, 1:13 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Wed Dec 8, 1:16 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:36 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Ben Gamari
, (Wed Dec 8, 6:01 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Wed Dec 8, 4:10 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Wed Dec 8, 5:19 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 8:31 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Ben Gamari
, (Mon Dec 13, 1:06 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, KAMEZAWA Hiroyuki
, (Mon Dec 13, 7:07 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 7:34 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 7:36 pm)
Navigation
Mailing list archives
Recent posts