All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.com>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Zi Yan <zi.yan@cs.rutgers.edu>,
	Yisheng Xie <xieyisheng1@huawei.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] Is MADV_HWPOISON supposed to work only on faulted-in pages?
Date: Mon, 27 Mar 2017 14:08:37 +0200	[thread overview]
Message-ID: <20170327140837.502b1296@linux-v3j5> (raw)
In-Reply-To: <20170227063308.GA14387@hori1.linux.bs1.fc.nec.co.jp>

Hi Naoya,

On Mon, 27 Feb 2017 06:33:09 +0000
"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com> wrote:

> 
> > I expected either madvise should fail because HWPOISON does not work on
> > non-existing physical pages or madvise_hwpoison() should populate
> > some physical pages for that virtual address range and poison them.  
> 
> The latter is the current behavior. It just comes from get_user_pages_fast()
> which not only finds the page and takes refcount, but also touch the page.

To clarify, the current behaviour seems to be the following:

1st madvise_hwpoison() -> EBUSY,
2nd madvise_hwpoison() -> SUCCESS, but no SIGBUS when the memory is accessed.

So it touches the zero page and madvise succeeds on the second attempt because
it is now mapped, but still the memory is not poisoned.

This means that when I modify the LTP test to accept EBUSY, it still fails if
a user runs it twice. This is OK, but I will need to document it in the test.

Thank you,
Richard.

--
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: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] Is MADV_HWPOISON supposed to work only on faulted-in pages?
Date: Mon, 27 Mar 2017 14:08:37 +0200	[thread overview]
Message-ID: <20170327140837.502b1296@linux-v3j5> (raw)
In-Reply-To: <20170227063308.GA14387@hori1.linux.bs1.fc.nec.co.jp>

Hi Naoya,

On Mon, 27 Feb 2017 06:33:09 +0000
"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com> wrote:

> 
> > I expected either madvise should fail because HWPOISON does not work on
> > non-existing physical pages or madvise_hwpoison() should populate
> > some physical pages for that virtual address range and poison them.  
> 
> The latter is the current behavior. It just comes from get_user_pages_fast()
> which not only finds the page and takes refcount, but also touch the page.

To clarify, the current behaviour seems to be the following:

1st madvise_hwpoison() -> EBUSY,
2nd madvise_hwpoison() -> SUCCESS, but no SIGBUS when the memory is accessed.

So it touches the zero page and madvise succeeds on the second attempt because
it is now mapped, but still the memory is not poisoned.

This means that when I modify the LTP test to accept EBUSY, it still fails if
a user runs it twice. This is OK, but I will need to document it in the test.

Thank you,
Richard.

  parent reply	other threads:[~2017-03-27 12:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 15:41 Is MADV_HWPOISON supposed to work only on faulted-in pages? Jan Stancek
2017-02-14 15:41 ` [LTP] " Jan Stancek
2017-02-20  5:00 ` Naoya Horiguchi
2017-02-20  5:00   ` [LTP] " Naoya Horiguchi
2017-02-23  3:23   ` Naoya Horiguchi
2017-02-23  3:23     ` [LTP] " Naoya Horiguchi
2017-02-25  2:28     ` Yisheng Xie
2017-02-25  2:28       ` [LTP] " Yisheng Xie
2017-02-27  1:20       ` Naoya Horiguchi
2017-02-27  1:20         ` [LTP] " Naoya Horiguchi
2017-02-27  4:27         ` Zi Yan
2017-02-27  4:27           ` [LTP] " Zi Yan
2017-02-27  6:33           ` Naoya Horiguchi
2017-02-27  6:33             ` [LTP] " Naoya Horiguchi
2017-02-27 16:10             ` Zi Yan
2017-02-27 16:10               ` [LTP] " Zi Yan
2017-03-14 13:20             ` Cyril Hrubis
2017-03-14 13:20               ` Cyril Hrubis
2017-03-27 12:08             ` Richard Palethorpe [this message]
2017-03-27 12:08               ` Richard Palethorpe
2017-03-27 23:54     ` Andi Kleen
2017-03-27 23:54       ` [LTP] " Andi Kleen
2017-03-28  8:25       ` Cyril Hrubis
2017-03-28  8:25         ` Cyril Hrubis
2017-03-28 20:26         ` Andi Kleen
2017-03-28 20:26           ` Andi Kleen

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=20170327140837.502b1296@linux-v3j5 \
    --to=rpalethorpe@suse.com \
    --cc=linux-mm@kvack.org \
    --cc=ltp@lists.linux.it \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=xieyisheng1@huawei.com \
    --cc=zi.yan@cs.rutgers.edu \
    /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.