From: John Hubbard <jhubbard@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
"Alistair Popple" <apopple@nvidia.com>
Subject: Re: [PATCH] mm/gup: Remove the restriction on locked with FOLL_LONGTERM
Date: Fri, 18 Nov 2022 18:55:24 -0800 [thread overview]
Message-ID: <ca8929ab-156d-00c0-4ad0-022f84774c57@nvidia.com> (raw)
In-Reply-To: <Y3fkYaW7Y8ZVDk8Y@nvidia.com>
On 11/18/22 12:00, Jason Gunthorpe wrote:
...
>> Even after this cleanup, gup.c is still a bit of a ball of string, what
>> with things like __gup_longterm_locked() actually handling
>> !FOLL_LONGTERM, and a bunch of other vestigial stuff, but this takes us
>> in the right direction.
>
> What do you think of this:
>
> https://github.com/jgunthorpe/linux/commits/gup
>
I like it--this cleans things up a lot!
A couple of tweaks I'd suggest would be:
1) Add an enum for "1" to the new enum, and use it. That will clarify
the call sites in the same way that GUP_GET_LOCK helps.
2) Don't change the name of the is_valid_gup_flags(). Or at least,
leave some for is "is_" in there. Because that makes the call sites
very nice:
if (!is_valid_gup_flags())
...bail out, etc
thanks,
--
John Hubbard
NVIDIA
prev parent reply other threads:[~2022-11-19 2:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 20:07 Jason Gunthorpe
2022-11-16 22:11 ` John Hubbard
2022-11-18 20:00 ` Jason Gunthorpe
2022-11-19 2:55 ` John Hubbard [this message]
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=ca8929ab-156d-00c0-4ad0-022f84774c57@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=jgg@nvidia.com \
--cc=linux-mm@kvack.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