Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8915511imu; Tue, 4 Dec 2018 17:01:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/WZRwK0Nnt9HrPyZpOrt4YTHprTgTn2Hs0u5QQXvezMYR49b/DvZC0P4/rl7mDvMh4lbmwq X-Received: by 2002:a63:4044:: with SMTP id n65mr18029209pga.90.1543971687516; Tue, 04 Dec 2018 17:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543971687; cv=none; d=google.com; s=arc-20160816; b=C8U3R9gfD49G87eCB1fprv0TchWyQ42uUPnd/J/E9yGn4OFpl2V1OJfxrJlhYuWz+Q M0O5C5wWS8hpC0yDhCZUXr21iqNBbfmdBdEGfepmUG8C1jHUiqhaJa4OK68gS08gbxho /uAD2hsGPBR4fi+APMrrHiVeAw0la2Hxir0bEHyVN5ZpFPoKfeEJVT3DY/gMU4EyDavl 7T/wXYfpktbw1J0G1gTQn336fU4lVbgbUu8SpylSR//4DMKCDo/ZQR7+MRNwfvZSv4Fv g8N7CvjhKcYG4HIS9EaYxLZxOVOKJZn/rxqRU1wrT3axk+bCS/bsQTzXWhbT7Q425HL3 LuHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=liGYvibBZS06Z2clwd5T65w/f1vhnHnTBJugp44TAtI=; b=yd8/wcBLQ9yrLgXwwjBqPf8eJShU7W4fz2Ypfwqy0wsUQURN1fJqoxvRHdB16kK4A8 ePqN4zX4PSSKez3541f0CEXYFkGjJngaxDGpnDRg4zVG8n4YmEH6/o1tH2SDcSvVvCOf fRlhqRGfrTlNNWjkaYctyatouvDdt3hyUFB5iHBBrcJRRNzW6YvLTV5WavsRBm+0FZAR xsvg25DeIzKOWNJhsxc1kSU0/hjs9mXE0vaSFil8p+Fe/U4Gmm/JbVIvBmjHOJfRdwnr I5J3UdhOvWvgLZecrgfOFCe5ED4HpHN2xlvJXFscnsC6ipqXhEQ0+s17feKciMthZOyq hruw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=xOxiTtMJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si19091466ple.387.2018.12.04.17.01.12; Tue, 04 Dec 2018 17:01:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=xOxiTtMJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726735AbeLEBAa (ORCPT + 99 others); Tue, 4 Dec 2018 20:00:30 -0500 Received: from mail-oi1-f175.google.com ([209.85.167.175]:45000 "EHLO mail-oi1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbeLEBAa (ORCPT ); Tue, 4 Dec 2018 20:00:30 -0500 Received: by mail-oi1-f175.google.com with SMTP id m6so16056220oig.11 for ; Tue, 04 Dec 2018 17:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=liGYvibBZS06Z2clwd5T65w/f1vhnHnTBJugp44TAtI=; b=xOxiTtMJcrP3c4nDbWw7M7TR/l6r5vVioW9Thhdhshe0NeZ/Ldk/wP+cJfdXwZLtJ4 fiMRhERLlO13ehlNuEBQmb9IadfSw/kqOO+IkyTY+EwxBNdVtguf78T9d5oIPpF4+y9H zm2xPo+5YBGeXmRapmtH1JJVccmbYUUyf2TkDqk4mGCAclbElfVWa6Luuub9O+lBnphU X88x8QuZm8nNU+4ugEODLcGf7i9ZN1ne8h44MVzwexjPVibumCa8jCbHYAc9N8Z5lx// A4fSqeZzdxeDv8ZCl9uqsRE+9UVWbVSnwHx9z+RVIObRdOmE4Wh2fHYst0R7LOCAeC6e hqYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=liGYvibBZS06Z2clwd5T65w/f1vhnHnTBJugp44TAtI=; b=Cg9h7Vldhew2sNoVsuR51l8CKnOiZxIjVa2h2Vvknet0DgRTA5V/iU5PkXarPwgoK/ Xq47wSOY6P2o5txlq3qGnn76bmNo4cFDyWOg+w40kUtxaT60sb5Ps0djAv7XGDSnwVOo 1Oixr6OM9XeNgZMQB9Uw6Az1lJp93PJa8zlo9ow//yG1IOp2T/c0tPhR++90bewaVgRX J8ydtoTBvTWmxTo6N6uD+He4K1Hr6MpB04rNXZAslEkne8BxUzj+k8U0NdFzPMN8aMSP hVS7RsHkSMs1xK/2kGoJ1CgH1EnXK0FPD+wwEPbhxSHn1kkwra0+Bw4a22gj/UmFSVMW eh4w== X-Gm-Message-State: AA+aEWYQVhA5w2fxnjyr6HCTbKCDiDg9gkijpwVny+v9a3KWe6/2OL1m r1cyd1KzjGbyfMbw7ETow4FY5rO55S+EDHbeCS/aKw== X-Received: by 2002:aca:4307:: with SMTP id q7mr8043451oia.105.1543971629135; Tue, 04 Dec 2018 17:00:29 -0800 (PST) MIME-Version: 1.0 References: <20181204001720.26138-1-jhubbard@nvidia.com> <20181204001720.26138-2-jhubbard@nvidia.com> <3c91d335-921c-4704-d159-2975ff3a5f20@nvidia.com> In-Reply-To: <3c91d335-921c-4704-d159-2975ff3a5f20@nvidia.com> From: Dan Williams Date: Tue, 4 Dec 2018 17:00:17 -0800 Message-ID: Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions To: John Hubbard Cc: John Hubbard , Andrew Morton , Linux MM , Jan Kara , tom@talpey.com, Al Viro , benve@cisco.com, Christoph Hellwig , Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Jason Gunthorpe , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Matthew Wilcox , Michal Hocko , mike.marciniszyn@intel.com, rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 4:58 PM John Hubbard wrote: > > On 12/4/18 3:03 PM, Dan Williams wrote: > > On Tue, Dec 4, 2018 at 1:56 PM John Hubbard wrote: [..] > > Ok, sorry, I mis-remembered. So, you're effectively trying to capture > > the end of the page pin event separate from the final 'put' of the > > page? Makes sense. > > > > Yes, that's it exactly. > > >> I was not able to actually find any place where a single additional page > >> bit would help our situation, which is why this still uses LRU fields for > >> both the two bits required (the RFC [1] still applies), and the dma_pinned_count. > > > > Except the LRU fields are already in use for ZONE_DEVICE pages... how > > does this proposal interact with those? > > Very badly: page->pgmap and page->hmm_data both get corrupted. Is there an entire > use case I'm missing: calling get_user_pages() on ZONE_DEVICE pages? Said another > way: is it reasonable to disallow calling get_user_pages() on ZONE_DEVICE pages? > > If we have to support get_user_pages() on ZONE_DEVICE pages, then the whole > LRU field approach is unusable. Unfortunately, the entire motivation for ZONE_DEVICE was to support get_user_pages() for persistent memory.