From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH RFC] move_pages12: handle errno EBUSY for madvise(..., MADV_SOFT_OFFLINE)
Date: Wed, 10 Jul 2019 14:59:54 +0200 [thread overview]
Message-ID: <20190710125954.GA5628@rei.lan> (raw)
In-Reply-To: <CAEemH2eMA78=5eNwJnZPJ1kw1GZnimSyBsQ+e_wrAu3E+JOoPg@mail.gmail.com>
Hi!
> > iteration, the mmap() will be failed with ENOMEM(since we only have 1 huge
> > page in /proc/.../nr_hugepages).
> >
>
> Sentence correction:
> It is not "only have 1 huge page in nr_hugepages", I mixed this test
> with another case, sorry about that.
>
> But the justification is the same, we don't have enough memory for the
> parent does mmap(..., MAP_HUGETLB) in a new loop.
I guess I get it now, if we attempt to continue after EBUSY we unmap()
the memory but that unmap() will happen asynchronously because the
migration is in progress and we hit ENOMEM just in the next iteration of
the loop.
Should we then attempt to retry the mmap() on ENOMEM as well, ideally
with exponential backoff?
Unfortunately we cannot reuse the TST_RETRY_FUNC() as it is because it
exits the test with TBROK on failure, we need a function that actually
returns the last function return value on timeout.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-07-10 12:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 9:52 [LTP] [PATCH RFC] move_pages12: handle errno EBUSY for madvise(..., MADV_SOFT_OFFLINE) Li Wang
2019-06-10 3:27 ` Naoya Horiguchi
2019-06-21 5:58 ` Yang Xu
2019-06-24 2:43 ` Li Wang
2019-06-27 2:50 ` Yang Xu
2019-07-04 3:29 ` Li Wang
2019-07-03 13:10 ` Cyril Hrubis
2019-07-04 5:48 ` Li Wang
2019-07-04 6:23 ` Li Wang
2019-07-10 12:59 ` Cyril Hrubis [this message]
2019-07-15 9:33 ` Li Wang
2019-07-24 9:33 ` Li Wang
2019-07-24 10:46 ` 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=20190710125954.GA5628@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox