linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Zach O'Keefe" <zokeefe@google.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Yang Shi <shy828301@gmail.com>,
	linux-mm@kvack.org, linux-man@vger.kernel.org,
	 Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH man-pages v3 2/4] madvise.2: document reliable probe for advice support
Date: Mon, 31 Oct 2022 09:33:37 -0700	[thread overview]
Message-ID: <CAAa6QmT_nGqVpgtNvcrcQos4VGkqF0_mv-L2098ygPHfnc4uyw@mail.gmail.com> (raw)
In-Reply-To: <2f67d133-8996-ef10-4a36-42537906ebba@gmail.com>

On Sun, Oct 30, 2022 at 4:44 AM Alejandro Colomar
<alx.manpages@gmail.com> wrote:
>
> Hi Zach,
>
> On 10/22/22 00:32, Zach OKeefe wrote:
> > From: Zach O'Keefe <zokeefe@google.com>
> >
> > EINVAL is an overloaded error code for madvise(2) and it's not clear
> > under what context it means "advice is not valid" vs another error.
> >
> > Explicitly document that madvise(0, 0, advice) can reliably be used to
> > probe for kernel support for "advice", returning zero iff "advice" is
> > supported by the kernel.
> >
> > Signed-off-by: Zach O'Keefe <zokeefe@google.com>
>
> Patch applied.

Thank you!

Best,
Zach

> Thanks,
>
> Alex
>
> > ---
> >   man2/madvise.2 | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/man2/madvise.2 b/man2/madvise.2
> > index 64f788ace..df3413cc8 100644
> > --- a/man2/madvise.2
> > +++ b/man2/madvise.2
> > @@ -790,6 +790,11 @@ that are not mapped, the Linux version of
> >   ignores them and applies the call to the rest (but returns
> >   .B ENOMEM
> >   from the system call, as it should).
> > +.PP
> > +.IR madvise(0,\ 0,\ advice)
> > +will return zero iff
> > +.I advice
> > +is supported by the kernel and can be relied on to probe for support.
> >   .\" .SH HISTORY
> >   .\" The
> >   .\" .BR madvise ()
>
> --
> <http://www.alejandro-colomar.es/>


  reply	other threads:[~2022-10-31 16:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 22:32 [PATCH man-pages v3 0/4] Add MADV_COLLAPSE documentation Zach OKeefe
2022-10-21 22:32 ` [PATCH man-pages v3 1/4] madvise.2: update THP file/shmem documentation for +5.4 Zach OKeefe
2022-10-30 11:41   ` Alejandro Colomar
2022-10-31 16:33     ` Zach O'Keefe
2022-10-31 20:11       ` Alejandro Colomar
2022-10-21 22:32 ` [PATCH man-pages v3 2/4] madvise.2: document reliable probe for advice support Zach OKeefe
2022-10-30 11:44   ` Alejandro Colomar
2022-10-31 16:33     ` Zach O'Keefe [this message]
2022-10-31 20:21       ` Alejandro Colomar
2022-10-31 21:24         ` Zach O'Keefe
2022-10-21 22:32 ` [PATCH man-pages v3 3/4] process_madvise.2: fix capability and ptrace requirements Zach OKeefe
2022-10-30 11:50   ` Alejandro Colomar
2022-10-31 19:13     ` Suren Baghdasaryan
2022-10-31 20:24       ` Alejandro Colomar
2022-10-31 21:25         ` Zach O'Keefe
2022-10-21 22:33 ` [PATCH man-pages v3 4/4] madvise.2: add documentation for MADV_COLLAPSE Zach OKeefe
2022-10-31 21:15   ` Alejandro Colomar
2022-10-31 23:00     ` Zach O'Keefe
2022-11-01  1:51     ` G. Branden Robinson
2022-11-01 12:12       ` Alejandro Colomar
2022-12-11 17:59   ` Alejandro Colomar
2022-12-11 21:51     ` Zach O'Keefe
2022-12-11 21:55       ` Alejandro Colomar
2022-12-11 22:37         ` Zach O'Keefe
2022-12-11 22:39           ` Alejandro Colomar

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=CAAa6QmT_nGqVpgtNvcrcQos4VGkqF0_mv-L2098ygPHfnc4uyw@mail.gmail.com \
    --to=zokeefe@google.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtk.manpages@gmail.com \
    --cc=shy828301@gmail.com \
    /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