linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Brice Goglin <Brice.Goglin@inria.fr>
To: Zhouping Liu <zliu@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: mm: move_pages syscall can't return ENOENT when pages are not present
Date: Wed, 09 May 2012 16:08:17 +0200	[thread overview]
Message-ID: <4FAA7A51.6050504@inria.fr> (raw)
In-Reply-To: <85e08d38-234a-4bc6-8c4f-6c92b50dc9b1@zmail13.collab.prod.int.phx2.redhat.com>

Le 09/05/2012 10:58, Zhouping Liu a A(C)crit :
> hi, all
>
> Recently, I found an error in move_pages syscall:
>
> depending on move_pages(2), when page is not present,
> it should fail with ENOENT, in fact, it's ok without
> any errno.
>
> the following reproducer can easily reproduce
> the issue, suggest you get more details by strace.
> inside reproducer, I try to move a non-exist page from
> node 1 to node 0.
>

If I understand correctly, 3 pages should migrate properly but the last
one cannot migrate because it's not present. In this case, move_pages
returns success. -ENOENT is set in the status array, not in the return
value/errno.

In the past, if *all* pages failed to migrate, move_pages would return
ENOENT instead of success, but the behavior was inconsistent so I
changed that in commit e78bbfa8262424417a29349a8064a535053912b9 as
Wanlong Gao said. But that should not matter here since 3 pages out of 4
are successfully migrated from what I understand.

The manpage should be updated (remove ENOENT from the ERRORS section,
but keep it in the "Page states in the status array" section).

Brice

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2012-05-09 14:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50e8b720-2459-4cf4-bfbd-fcc4cd408249@zmail13.collab.prod.int.phx2.redhat.com>
2012-05-09  8:58 ` mm: move_pages syscall can't return ENOENT when pages are not present Zhouping Liu
2012-05-09  9:28   ` Xiaotian Feng
2012-05-09 12:50     ` Wanlong Gao
2012-05-09 13:33       ` Zhouping Liu
2012-05-09 14:56         ` Wanlong Gao
2012-05-09 14:08   ` Brice Goglin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FAA7A51.6050504@inria.fr \
    --to=brice.goglin@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=zliu@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).