On Mon, Jul 30, 2012 at 9:29 PM, Christoph Lameter <[email protected]> wrote:
> On Sat, 28 Jul 2012, JoonSoo Kim wrote:
>
>> 2012/7/28 Christoph Lameter <[email protected]>:
>> > On Sat, 28 Jul 2012, Joonsoo Kim wrote:
>> >
>> >> move_pages() syscall may return success in case that
>> >> do_move_page_to_node_array return positive value which means migration failed.
>> >
>> > Nope. It only means that the migration for some pages has failed. This may
>> > still be considered successful for the app if it moves 10000 pages and one
>> > failed.
>> >
>> > This patch would break the move_pages() syscall because an error code
>> > return from do_move_pages_to_node_array() will cause the status byte for
>> > each page move to not be updated anymore. Application will not be able to
>> > tell anymore which pages were successfully moved and which are not.
>>
>> In case of returning non-zero, valid status is not required according
>> to man page.
>
> Cannot find a statement like that in the man page. The return code
> description is incorrect. It should that that is returns the number of
> pages not moved otherwise an error code (Michael please fix the manpage).
Hi Christoph,
Is the patch below acceptable? (I've attached the complete page as well.)
See you in San Diego (?),
Michael
--- a/man2/migrate_pages.2
+++ b/man2/migrate_pages.2
@@ -29,7 +29,7 @@ migrate_pages \- move all pages in a process to
another set of nodes
Link with \fI\-lnuma\fP.
.SH DESCRIPTION
.BR migrate_pages ()
-moves all pages of the process
+attempts to move all pages of the process
.I pid
that are in memory nodes
.I old_nodes
@@ -87,7 +87,8 @@ privilege.
.SH "RETURN VALUE"
On success
.BR migrate_pages ()
-returns zero.
+returns the number of pages that cold not be moved
+(i.e., a return of zero means that all pages were successfully moved).
On error, it returns \-1, and sets
.I errno
to indicate the error.
--
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/
On Wed, 1 Aug 2012, Michael Kerrisk wrote:
> Is the patch below acceptable? (I've attached the complete page as well.)
Yes looks good.
> See you in San Diego (?),
Yup. I will be there too.
On Wed, Aug 1, 2012 at 8:00 PM, Christoph Lameter <[email protected]> wrote:
> On Wed, 1 Aug 2012, Michael Kerrisk wrote:
>
>> Is the patch below acceptable? (I've attached the complete page as well.)
>
> Yes looks good.
Thanks for checking it!
>> See you in San Diego (?),
>
> Yup. I will be there too.
See you then!
Cheers,
Michael
--
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/