From: CAI Qian <caiqian@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Shaohua Li <shli@kernel.org>
Subject: Re: change of behavior for madvise in 3.9-rc1
Date: Thu, 7 Mar 2013 21:05:18 -0500 (EST) [thread overview]
Message-ID: <1613107327.11152810.1362708318813.JavaMail.root@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1303071042390.6087@eggly.anvils>
----- Original Message -----
> From: "Hugh Dickins" <hughd@google.com>
> To: "Shaohua Li" <shli@kernel.org>
> Cc: "CAI Qian" <caiqian@redhat.com>, "linux-mm" <linux-mm@kvack.org>, "linux-kernel" <linux-kernel@vger.kernel.org>,
> "Rik van Riel" <riel@redhat.com>, "Sasha Levin" <sasha.levin@oracle.com>, "Andrew Morton"
> <akpm@linux-foundation.org>, "Linus Torvalds" <torvalds@linux-foundation.org>
> Sent: Friday, March 8, 2013 2:49:48 AM
> Subject: Re: change of behavior for madvise in 3.9-rc1
>
> On Thu, 7 Mar 2013, Shaohua Li wrote:
> > On Wed, Mar 06, 2013 at 11:05:04PM -0500, CAI Qian wrote:
> > > Bisecting indicated that this commit,
> > > 1998cc048901109a29924380b8e91bc049b32951
> > > mm: make madvise(MADV_WILLNEED) support swap file prefetch
> > >
> > > Caused an LTP test failure,
> > > http://goo.gl/1FVPy
> > >
> > > madvise02 1 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 2 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 3 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 4 TPASS : failed as expected:
> > > TEST_ERRNO=ENOMEM(12): Cannot allocate memory
> > > madvise02 5 TFAIL : madvise succeeded unexpectedly
> > >
> > > While it passed without the above commit
> > > madvise02 1 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 2 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 3 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 4 TPASS : failed as expected:
> > > TEST_ERRNO=ENOMEM(12): Cannot allocate memory
> > > madvise02 5 TPASS : failed as expected:
> > > TEST_ERRNO=EBADF(9): Bad file descriptor
> >
> > I thought this is expected behavior. madvise(MADV_WILLNEED) to
> > anonymous memory
> > doesn't return -EBADF now, as now we support swap prefretch.
>
> I agree with Shaohua: although the kernel strives for
> back-compatibility
> with userspace, I don't think that goes so far as to tell an
> arbitrary LTP
> test that it has failed, once the kernel has been enhanced to support
> new
> functionality. We could never add or extend system calls if that
> were so.
Thanks for looking this. We will try to fix the LTP test instead.
>
> Hugh
>
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: CAI Qian <caiqian@redhat.com>
To: Hugh Dickins <hughd@google.com>
Cc: linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Shaohua Li <shli@kernel.org>
Subject: Re: change of behavior for madvise in 3.9-rc1
Date: Thu, 7 Mar 2013 21:05:18 -0500 (EST) [thread overview]
Message-ID: <1613107327.11152810.1362708318813.JavaMail.root@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1303071042390.6087@eggly.anvils>
----- Original Message -----
> From: "Hugh Dickins" <hughd@google.com>
> To: "Shaohua Li" <shli@kernel.org>
> Cc: "CAI Qian" <caiqian@redhat.com>, "linux-mm" <linux-mm@kvack.org>, "linux-kernel" <linux-kernel@vger.kernel.org>,
> "Rik van Riel" <riel@redhat.com>, "Sasha Levin" <sasha.levin@oracle.com>, "Andrew Morton"
> <akpm@linux-foundation.org>, "Linus Torvalds" <torvalds@linux-foundation.org>
> Sent: Friday, March 8, 2013 2:49:48 AM
> Subject: Re: change of behavior for madvise in 3.9-rc1
>
> On Thu, 7 Mar 2013, Shaohua Li wrote:
> > On Wed, Mar 06, 2013 at 11:05:04PM -0500, CAI Qian wrote:
> > > Bisecting indicated that this commit,
> > > 1998cc048901109a29924380b8e91bc049b32951
> > > mm: make madvise(MADV_WILLNEED) support swap file prefetch
> > >
> > > Caused an LTP test failure,
> > > http://goo.gl/1FVPy
> > >
> > > madvise02 1 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 2 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 3 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 4 TPASS : failed as expected:
> > > TEST_ERRNO=ENOMEM(12): Cannot allocate memory
> > > madvise02 5 TFAIL : madvise succeeded unexpectedly
> > >
> > > While it passed without the above commit
> > > madvise02 1 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 2 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 3 TPASS : failed as expected:
> > > TEST_ERRNO=EINVAL(22): Invalid argument
> > > madvise02 4 TPASS : failed as expected:
> > > TEST_ERRNO=ENOMEM(12): Cannot allocate memory
> > > madvise02 5 TPASS : failed as expected:
> > > TEST_ERRNO=EBADF(9): Bad file descriptor
> >
> > I thought this is expected behavior. madvise(MADV_WILLNEED) to
> > anonymous memory
> > doesn't return -EBADF now, as now we support swap prefretch.
>
> I agree with Shaohua: although the kernel strives for
> back-compatibility
> with userspace, I don't think that goes so far as to tell an
> arbitrary LTP
> test that it has failed, once the kernel has been enhanced to support
> new
> functionality. We could never add or extend system calls if that
> were so.
Thanks for looking this. We will try to fix the LTP test instead.
>
> Hugh
>
next prev parent reply other threads:[~2013-03-08 2:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1543700056.10481632.1362628775559.JavaMail.root@redhat.com>
2013-03-07 4:05 ` change of behavior for madvise in 3.9-rc1 CAI Qian
2013-03-07 4:05 ` CAI Qian
2013-03-07 4:39 ` Shaohua Li
2013-03-07 4:39 ` Shaohua Li
2013-03-07 18:49 ` Hugh Dickins
2013-03-07 18:49 ` Hugh Dickins
2013-03-08 2:05 ` CAI Qian [this message]
2013-03-08 2:05 ` CAI Qian
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=1613107327.11152810.1362708318813.JavaMail.root@redhat.com \
--to=caiqian@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
--cc=sasha.levin@oracle.com \
--cc=shli@kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.