From: Michal Hocko <mhocko@suse.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
vbabka@suse.cz, surenb@google.com, stable@vger.kernel.org,
sfr@canb.auug.org.au, rientjes@google.com, nadav.amit@gmail.com,
quic_charante@quicinc.com, patches@lists.linux.dev,
linux-mm@kvack.org, mm-commits@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: [patch 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise
Date: Wed, 23 Mar 2022 09:28:37 +0100 [thread overview]
Message-ID: <YjraNQkmtkLiv1yz@dhcp22.suse.cz> (raw)
In-Reply-To: <Yjpo2jnp5pkJr+XI@google.com>
On Tue 22-03-22 17:24:58, Minchan Kim wrote:
> On Tue, Mar 22, 2022 at 02:46:48PM -0700, Andrew Morton wrote:
> > From: Charan Teja Kalla <quic_charante@quicinc.com>
> > Subject: mm: madvise: skip unmapped vma holes passed to process_madvise
> >
> > The process_madvise() system call is expected to skip holes in vma passed
> > through 'struct iovec' vector list. But do_madvise, which
> > process_madvise() calls for each vma, returns ENOMEM in case of unmapped
> > holes, despite the VMA is processed.
> >
> > Thus process_madvise() should treat ENOMEM as expected and consider the
> > VMA passed to as processed and continue processing other vma's in the
> > vector list. Returning -ENOMEM to user, despite the VMA is processed,
> > will be unable to figure out where to start the next madvise.
> >
> > Link: https://lkml.kernel.org/r/4f091776142f2ebf7b94018146de72318474e686.1647008754.git.quic_charante@quicinc.com
>
> I thought it was still under discussion and Charan will post next
> version along with previous patch
> "mm: madvise: return correct bytes advised with process_madvise"
>
> https://lore.kernel.org/linux-mm/7207b2f5-6b3e-aea4-aa1b-9c6d849abe34@quicinc.com/
Yes, I am not even sure the new semantic is sensible[1]. We should discuss
that and see all the consequences. Changing the semantic of an existing
syscall is always tricky going back and forth is even worse.
--
Michal Hocko
SUSE Labs
next parent reply other threads:[~2022-03-23 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org>
[not found] ` <20220322214648.AB7A1C340EC@smtp.kernel.org>
[not found] ` <Yjpo2jnp5pkJr+XI@google.com>
2022-03-23 8:28 ` Michal Hocko [this message]
2022-03-23 15:47 ` Charan Teja Kalla
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=YjraNQkmtkLiv1yz@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=patches@lists.linux.dev \
--cc=quic_charante@quicinc.com \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=torvalds@linux-foundation.org \
--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
all inboxes | Powered by JetHome®