From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: "Potyra, Stefan" <Stefan.Potyra@elektrobit.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Jordan, Tobias" <Tobias.Jordan@elektrobit.com>,
akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com,
kirill.shutemov@linux.intel.com, linux-api@vger.kernel.org
Subject: Re: [PATCH] mm: mlockall error for flag MCL_ONFAULT
Date: Fri, 24 May 2019 17:43:04 -0400 [thread overview]
Message-ID: <20190524214304.enntpu4tvzpyxzfe@ca-dmjordan1.us.oracle.com> (raw)
In-Reply-To: <20190522112329.GA25483@er01809n.ebgroup.elektrobit.com>
[ Adding linux-api and some of the people who were involved in the
MCL_ONFAULT/mlock2/etc discussions. Author of the Fixes patch appears to
have moved on. ]
On Wed, May 22, 2019 at 11:23:37AM +0000, Potyra, Stefan wrote:
> If mlockall() is called with only MCL_ONFAULT as flag,
> it removes any previously applied lockings and does
> nothing else.
The change looks reasonable. Hard to imagine any application relies on it, and
they really shouldn't be if they are. Debian codesearch turned up only a few
cases where stress-ng was doing this for unknown reasons[1] and this change
isn't gonna break those. In this case I think changing the syscall's behavior
is justified.
> This behavior is counter-intuitive and doesn't match the
> Linux man page.
I'd quote it for the changelog:
For mlockall():
EINVAL Unknown flags were specified or MCL_ONFAULT was specified with‐
out either MCL_FUTURE or MCL_CURRENT.
With that you can add
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
[1] https://sources.debian.org/src/stress-ng/0.09.50-1/stress-mlock.c/?hl=203#L203
next prev parent reply other threads:[~2019-05-24 21:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 11:23 Potyra, Stefan
2019-05-24 21:43 ` Daniel Jordan [this message]
2019-05-27 7:04 ` Michal Hocko
2019-05-27 7:53 ` [PATCH v2] " Potyra, Stefan
2019-05-27 13:19 ` Vlastimil Babka
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=20190524214304.enntpu4tvzpyxzfe@ca-dmjordan1.us.oracle.com \
--to=daniel.m.jordan@oracle.com \
--cc=Stefan.Potyra@elektrobit.com \
--cc=Tobias.Jordan@elektrobit.com \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=vbabka@suse.cz \
/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