From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: Update do_vmi_align_munmap() return semantics
Date: Fri, 30 Jun 2023 12:41:35 -0400 [thread overview]
Message-ID: <20230630164135.725ewvttype5tt6x@revolver> (raw)
In-Reply-To: <CAHk-=wg=DGSsA+=rr3bMDKrGNgy4C+PGM_w2PtpK4+Sx9qFF8w@mail.gmail.com>
* Linus Torvalds <torvalds@linux-foundation.org> [230630 12:19]:
> On Fri, 30 Jun 2023 at 09:06, Liam R. Howlett <Liam.Howlett@oracle.com> wrote:
> >
> > Update do_vmi_align_munmap() to return 0 for success. Clean up the
> > callers and comments to always expect the lock downgrade to be honored
> > on the success path. The error path will always leave the lock
> > untouched.
>
> Thanks for doing this, but with this cleanup, it becomes clear that
> some of the callers that asked for a downgrade didn't actually want
> that at all...
...
>
> I didn't look at what all the indirect callers here were doing, but it
> really looked to me like *most* callers wanted the lock dropped
> entirely at the end.
>
> In fact, looking at that patch, it looks like *all* of the callers
> that asked for downgrading actually really wanted the lock dropped
> entirely.
>
> But I may well be missing some context. So take this not as a NAK,
> but as a "you looked at all this code, could it perhaps be simplified
> a bit more still?"
>
Sure, I noticed that but didn't want to change too much, at least in one
commit. I'll double check and will keep cleaning here.
I'm not sure how many error scenarios need the lock at all on return
either.
I hesitate to ask considering how much trouble I've caused with the
32bit map flag, but I also wonder about the stack guard now that the
write lock is taken for stack expansion?
Thanks,
Liam
next prev parent reply other threads:[~2023-06-30 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <wiuXi4KmjgTocOZMpHTZuZP+y8r5wYynvvT_ZPXyG+TYA@mail.gmail.com>
2023-06-30 16:05 ` Liam R. Howlett
2023-06-30 16:19 ` Linus Torvalds
2023-06-30 16:41 ` Liam R. Howlett [this message]
2023-06-30 17:21 ` Linus Torvalds
2023-06-30 19:07 ` Liam R. Howlett
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=20230630164135.725ewvttype5tt6x@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/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