[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <69540e85-b527-0252-7b29-8932660af72d@nvidia.com>
Date: Tue, 23 Jul 2019 16:24:23 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Ira Weiny <ira.weiny@...el.com>
CC: <john.hubbard@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Björn Töpel <bjorn.topel@...el.com>,
Boaz Harrosh <boaz@...xistor.com>,
Christoph Hellwig <hch@....de>,
Daniel Vetter <daniel@...ll.ch>,
Dan Williams <dan.j.williams@...el.com>,
Dave Chinner <david@...morbit.com>,
David Airlie <airlied@...ux.ie>,
"David S . Miller" <davem@...emloft.net>,
Ilya Dryomov <idryomov@...il.com>, Jan Kara <jack@...e.cz>,
Jason Gunthorpe <jgg@...pe.ca>, Jens Axboe <axboe@...nel.dk>,
Jérôme Glisse <jglisse@...hat.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Miklos Szeredi <miklos@...redi.hu>,
Ming Lei <ming.lei@...hat.com>, Sage Weil <sage@...hat.com>,
Santosh Shilimkar <santosh.shilimkar@...cle.com>,
Yan Zheng <zyan@...hat.com>, <netdev@...r.kernel.org>,
<dri-devel@...ts.freedesktop.org>, <linux-mm@...ck.org>,
<linux-rdma@...r.kernel.org>, <bpf@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] net/xdp: convert put_page() to put_user_page*()
On 7/23/19 11:06 AM, Ira Weiny wrote:
> On Mon, Jul 22, 2019 at 09:41:34PM -0700, John Hubbard wrote:
>> On 7/22/19 5:25 PM, Ira Weiny wrote:
>>> On Mon, Jul 22, 2019 at 03:34:15PM -0700, john.hubbard@...il.com wrote:
...
>> 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
Powered by blists - more mailing lists