All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] madvise07: Increase probability of testing a supported page type
Date: Wed, 13 Sep 2017 14:44:56 +0200	[thread overview]
Message-ID: <20170913124456.GA28447@rei.lan> (raw)
In-Reply-To: <862571300.14738390.1505297297582.JavaMail.zimbra@redhat.com>

Hi!
> > Wouldn't this mean that the API is broken by desing?
> > 
> > One thing is that the call does not work on an unmapped page and fails
> > to return an error. But if we cannot even guarantee that it will work
> > if we make an effort to fault the page in advance its horribly broken by
> > design.
> 
> I think Richard was talking about scenario where something happens
> to page you just faulted in, e.g. it's swapped out for some reason.
> That should be quite unlikely.

We can always mlock() the page if that ever happens...

> > > I don't have objections to patch, but I'm thinking if we should go
> > > further if there's possibility the test still won't be reliable.
> > > We could relax the condition, for example by FAILing only if
> > > child dies unexpectedly (signal != SIGBUS).
> > 
> > What would that mean, producing TCONF on any error from the madvise()
> > call? Looking at manual pages the only error we may get running
> > MADVISE_HWPOISON as a root on a mapped page is the EINVAL we handle
> > anyway.
> 
> I'd stay with just "mmap+touch anonymous memory" for now and see if
> that ever fails.

I've applied the patch from Richard.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-09-13 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 13:48 [LTP] [PATCH] madvise07: Increase probability of testing a supported page type Richard Palethorpe
2017-08-30  7:51 ` Jan Stancek
2017-09-01 12:44   ` Richard Palethorpe
2017-09-12 15:45   ` Cyril Hrubis
2017-09-13 10:08     ` Jan Stancek
2017-09-13 12:44       ` Cyril Hrubis [this message]
2017-09-13 12:45 ` Cyril Hrubis

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=20170913124456.GA28447@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.