From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hubbard Subject: Re: [PATCH 3/3] net/xdp: convert put_page() to put_user_page*() Date: Tue, 23 Jul 2019 16:24:23 -0700 Message-ID: <69540e85-b527-0252-7b29-8932660af72d@nvidia.com> References: <20190722223415.13269-1-jhubbard@nvidia.com> <20190722223415.13269-4-jhubbard@nvidia.com> <20190723002534.GA10284@iweiny-DESK2.sc.intel.com> <20190723180612.GB29729@iweiny-DESK2.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190723180612.GB29729@iweiny-DESK2.sc.intel.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Ira Weiny Cc: john.hubbard@gmail.com, Andrew Morton , Alexander Viro , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Boaz Harrosh , Christoph Hellwig , Daniel Vetter , Dan Williams , Dave Chinner , David Airlie , "David S . Miller" , Ilya Dryomov , Jan Kara , Jason Gunthorpe , Jens Axboe , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Johannes Thumshirn , Magnus Karlsson , Matthew Wilcox , Miklos Szeredi List-Id: dri-devel@lists.freedesktop.org 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@gmail.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