From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f195.google.com ([209.85.166.195]:39043 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbeLAIpW (ORCPT ); Sat, 1 Dec 2018 03:45:22 -0500 Received: by mail-it1-f195.google.com with SMTP id a6so586005itl.4 for ; Fri, 30 Nov 2018 13:34:43 -0800 (PST) Subject: Re: [PATCH 24/27] block: implement bio helper to add iter kvec pages to bio To: Al Viro Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, hch@lst.de References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-25-axboe@kernel.dk> <20181130192102.GP2217@ZenIV.linux.org.uk> <6e42d763-9c94-6b84-7099-f5ef5964404c@kernel.dk> <1545b364-df01-51e7-1786-56dde7c49b5d@kernel.dk> <20181130211117.GQ2217@ZenIV.linux.org.uk> <07803d69-84cc-bb39-686f-2f50874ea184@kernel.dk> <20181130212503.GS2217@ZenIV.linux.org.uk> From: Jens Axboe Message-ID: <1de11537-56c0-a9d1-60da-68c5b3e431ce@kernel.dk> Date: Fri, 30 Nov 2018 14:34:40 -0700 MIME-Version: 1.0 In-Reply-To: <20181130212503.GS2217@ZenIV.linux.org.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 11/30/18 2:25 PM, Al Viro wrote: > On Fri, Nov 30, 2018 at 02:16:38PM -0700, Jens Axboe wrote: >>>> Would this make you happy: >>>> >>>> if (!is_vmalloc_addr(kv->iov_base)) >>>> page = virt_to_page(kv->iov_base); >>>> else >>>> page = vmalloc_to_page(kv->iov_base); >>> >>> Free advice: don't ever let Linus see anything along those lines. Results >>> tend to be colourful... >> >> We already have those lines in the kernel, XFS for instance. Al, could you >> please try to be helpful instead of being deliberately obtuse? > > Again, the last time something like that had been suggested, Linus had replied > with a very impressive rant. I *did* propose pretty much that, and reaction > was basically "hell no, not in general-purpose primitives". Precisely about > iov_iter stuff. A part of that was due to touching page refcounts, but quite > a bit wasn't. Nobody is touching the page count here, and for the aio user mapped IO, nobody is touching them at the end either. As far as I can tell, the above is fine. It's either a vmalloc'ed address and should be treated specially, or we can do virt_to_page() on it. Do you have a link to said rant? -- Jens Axboe