Thread (12 messages) read the whole thread 12 messages, 5 authors, 2019-07-23

Re: [PATCH 3/3] net/xdp: convert put_page() to put_user_page*()

From: John Hubbard <jhubbard@nvidia.com>
Date: 2019-07-23 23:24:27
Also in: bpf, dri-devel, linux-mm, linux-rdma, lkml

On 7/23/19 11:06 AM, Ira Weiny wrote:
On Mon, Jul 22, 2019 at 09:41:34PM -0700, John Hubbard wrote:
quoted
On 7/22/19 5:25 PM, Ira Weiny wrote:
quoted
On Mon, Jul 22, 2019 at 03:34:15PM -0700, john.hubbard@gmail.com wrote:
...
quoted
Obviously, this stuff is all subject to a certain amount of opinion, but I
think I'm on really solid ground as far as precedent goes. So I'm pushing
back on the NAK... :)
Fair enough...  However, we have discussed in the past how GUP can be a
confusing interface to use.

So I'd like to see it be more directed.  Only using the __put_user_pages()
version allows us to ID callers easier through a grep of PUP_FLAGS_DIRTY_LOCK
in addition to directing users to use that interface rather than having to read
the GUP code to figure out that the 2 calls above are equal.  It is not a huge
deal but...
OK, combining all the feedback to date, which is:

* the leading double underscore is unloved,

* set_page_dirty() is under investigation, but likely guilty of incitement
  to cause bugs,


...we end up with this:

void put_user_pages_dirty_lock(struct page **pages, unsigned long npages,
			       bool make_dirty)

...which I have a v2 patchset for, ready to send out. It makes IB all pretty 
too. :)


thanks,
-- 
John Hubbard
NVIDIA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help