lkml.org 
[lkml]   [2008]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/5] mm: stop returning -ENOENT from sys_move_pages() if nothing got migrated
    There is no point in returning -ENOENT from sys_move_pages() if all
    pages were already on the right node, while we return 0 if only 1 page
    was not. Most application don't know where their pages are allocated,
    so it's not an error to try to migrate them anyway.

    Just return 0 and let the status array in user-space be checked if the
    application needs details.

    It will make the upcoming chunked-move_pages() support much easier.

    Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
    ---
    mm/migrate.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/mm/migrate.c b/mm/migrate.c
    index 2a80136..e505b2f 100644
    --- a/mm/migrate.c
    +++ b/mm/migrate.c
    @@ -926,11 +926,10 @@ set_status:
    pp->status = err;
    }

    + err = 0;
    if (!list_empty(&pagelist))
    err = migrate_pages(&pagelist, new_page_node,
    (unsigned long)pm);
    - else
    - err = -ENOENT;

    up_read(&mm->mmap_sem);
    return err;
    --
    1.5.6.5




    \
     
     \ /
      Last update: 2008-10-13 22:25    [W:6.486 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site