lkml.org 
[lkml]   [2011]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
    Hi Hillf,

    On Fri, Nov 25, 2011 at 08:20:31PM +0800, Hillf Danton wrote:
    > Skip unlocking page if fail to lock, then lock and unlock are paired.
    >
    > Signed-off-by: Hillf Danton <dhillf@gmail.com>
    > ---
    >
    > --- a/mm/migrate.c Fri Nov 25 20:11:14 2011
    > +++ b/mm/migrate.c Fri Nov 25 20:21:26 2011
    > @@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_
    >
    > if (anon_vma)
    > put_anon_vma(anon_vma);
    > -out:
    > unlock_page(hpage);
    >
    > +out:
    > if (rc != -EAGAIN) {
    > list_del(&hpage->lru);
    > put_page(hpage);

    Looks good, I guess that path wasn't exercised frequently because
    there's no blocking I/O involvement with hugetlbfs.

    Thanks,
    Andrea


    \
     
     \ /
      Last update: 2011-11-26 19:55    [W:0.018 / U:4.996 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site