Re: [PATCH 02/11] mm,migration: Do not try to migrate unmapped anonymous pages

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mel Gorman
Date: Thursday, March 25, 2010 - 6:39 am

On Thu, Mar 25, 2010 at 07:12:29PM +0900, KAMEZAWA Hiroyuki wrote:

Good point.


There were minor changes in how the rcu_read_lock is taken and released
based on other comments. With your suggestion, the block now looks like;

        if (PageAnon(page)) {
                rcu_read_lock();
                rcu_locked = 1;

                /*
                 * If the page has no mappings any more, just bail. An
                 * unmapped anon page is likely to be freed soon but
                 * worse,
                 * it's possible its anon_vma disappeared between when
                 * the page was isolated and when we reached here while
                 * the RCU lock was not held
                 */
                if (!page_mapcount(page) && !PageSwapCache(page))
                        goto rcu_unlock;

                anon_vma = page_anon_vma(page);
                atomic_inc(&anon_vma->external_refcount);
        }

Thanks.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Sun Mar 14, 10:34 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Sun Mar 14, 11:44 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Mon Mar 15, 12:09 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Mon Mar 15, 4:49 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Tue Mar 16, 7:12 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Tue Mar 16, 8:15 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Tue Mar 16, 9:19 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., Christoph Lameter, (Wed Mar 17, 9:41 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Wed Mar 17, 5:30 pm)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Thu Mar 25, 2:02 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Thu Mar 25, 2:08 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Thu Mar 25, 2:41 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Thu Mar 25, 3:12 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., Mel Gorman, (Thu Mar 25, 6:39 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., Christoph Lameter, (Thu Mar 25, 7:35 am)
Re: [PATCH 02/11] mm,migration: Do not try to migrate unma ..., KAMEZAWA Hiroyuki, (Thu Mar 25, 5:58 pm)