[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAmzW4OaNNPATQ_Jm6vfXJ1pkLMZ7HFFbhA8rXQkiXs2KeiPjQ@mail.gmail.com>
Date: Wed, 18 Jul 2012 00:41:08 +0900
From: JoonSoo Kim <js1304@...il.com>
To: Christoph Lameter <cl@...ux.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Sasha Levin <levinsasha928@...il.com>
Subject: Re: [PATCH 2/4 v2] mm: fix possible incorrect return value of
migrate_pages() syscall
2012/7/17 Christoph Lameter <cl@...ux.com>:
> On Tue, 17 Jul 2012, Joonsoo Kim wrote:
>
>> @@ -1382,6 +1382,8 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
>>
>> err = do_migrate_pages(mm, old, new,
>> capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
>> + if (err > 0)
>> + err = -EBUSY;
>>
>> mmput(mm);
>> out:
>
> Why not have do_migrate_pages() return EBUSY if we do not need the number
> of failed/retried pages?
There is no serious reason.
do_migrate_pages() have two callsites, although another one doesn't
use return value.
do_migrate_pages() is commented "Return the number of page ...".
And my focus is fixing possible error in migrate_pages() syscall.
So, I keep to return the number of failed/retired pages.
If we really think the number of failed/retired pages is useless, in that time,
instead that do_migrate_pages() return EBUSY, we can make migrate_pages()
return EBUSY. I think it is better to fix all the related codes at one go.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists