lkml.org 
[lkml]   [2012]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/3] balancenuma: fix page locking in migrating thp
    On Sat, Nov 24, 2012 at 12:27:39PM +0800, Hillf Danton wrote:
    > If fail to migrate thp(due to unsuccessful isolation), and if the original
    > pmd entry is changed after reaquiring page table lock, it is unsafe to
    > release the page lock as page maybe unstable.
    >
    > It is fixed by raising extra page count before trying migration.
    >

    Less sure of this one but the locking here is a mess. A reference count
    is already taken. Isolating the page takes another reference count so the
    first one can be dropped without the page being freed underneath us. The
    migration function takes care of unlocking the page on a successful
    migration. On unsuccessful migration, the PMD is rechecked under the
    lock before clearing the pmd_numa. I'm not sure where you are seeing
    the instability but I haven't fired up my brain either (it's the weekend
    :)). I'll take a fresh look at this Monday.

    Thanks!

    --
    Mel Gorman
    SUSE Labs


    \
     
     \ /
      Last update: 2012-11-24 14:41    [W:4.045 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site