Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1855132imu; Sat, 8 Dec 2018 08:34:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/WV+IpneQ95mYSuJ9SqY8paB/MwQPP/gtHpM3bRj0ZoDhPZHmC6J0YF51hFyIe6oosuzMpB X-Received: by 2002:a17:902:7201:: with SMTP id ba1mr6122550plb.105.1544286896816; Sat, 08 Dec 2018 08:34:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544286896; cv=none; d=google.com; s=arc-20160816; b=t1/1Ah7EwpjjYYzBh0iK3o1qorlqnuY4NYj/eHK7VE/9B3IIThHCfcTBwmEEVaUc7S SGWlEaced9KM67Op75xAYNkKP5NO9kKdafoIrPci44s0Fzd5G96I/oRvYcW/DybRnCV7 th9KWhSyISgRg2jkpdYIs1vncBDwgnXljjXpvyDx4Bh5OVDk+iuz5PW/QzPARrkMtYJ3 XrfzfH9BFiBfmj/1FmejrjIqX5gjGyy6CJt9R/cIaftXzBN90T5xS6o52t538pZvLQnF 6aizR1Zr+n/yPh21rGU4mPXU4TpR2nRv5mR/qCK28C/wpL1UMkw318CtXBsIighB9x0L Kw1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=S7OwzVWUyWsq/PCaHqV2u5+G0dOqeHfccnePcnFiTeg=; b=x/bZ564kxatjZnnNjk3zmUMopjoN6lLE1N/SZiLt4uHrN+ven2JH3Cd2CAWgAp0ObE 8nE1CZxmjHHk+lSNmwbnWCpImAhP0y+84l6UafTngKd+QYzpb5jAB2zZ6FUkyc5ANi++ l9YTey9DgOtGkoGPsgzq8bvSaouNGWYaaegzlVMPzafJIKRyPVuKnm/UQu4IuuACXVQT 8hXGLDr925JG8YJRYcTN9qwycRNDNLSe3DLt7eA9dOMkVKFKXe2Ba/fZxM7H3zO1esB5 FFhGCWT4Ttt7KiOvDe5saBXDceEyMNn9LrdW4cbXeqvI3MkUUqrDGgxe5B1fdSbXm+Fr DCZA== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si5624741pge.261.2018.12.08.08.34.36; Sat, 08 Dec 2018 08:34:56 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbeLHQeA (ORCPT + 99 others); Sat, 8 Dec 2018 11:34:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726176AbeLHQd7 (ORCPT ); Sat, 8 Dec 2018 11:33:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7619F308421A; Sat, 8 Dec 2018 16:33:58 +0000 (UTC) Received: from redhat.com (ovpn-120-239.rdu2.redhat.com [10.10.120.239]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C79F95DD63; Sat, 8 Dec 2018 16:33:55 +0000 (UTC) Date: Sat, 8 Dec 2018 11:33:53 -0500 From: Jerome Glisse To: Dan Williams Cc: John Hubbard , Matthew Wilcox , 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 , Michal Hocko , Mike Marciniszyn , rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181208163353.GA2952@redhat.com> References: <3c91d335-921c-4704-d159-2975ff3a5f20@nvidia.com> <20181205011519.GV10377@bombadil.infradead.org> <20181205014441.GA3045@redhat.com> <59ca5c4b-fd5b-1fc6-f891-c7986d91908e@nvidia.com> <7b4733be-13d3-c790-ff1b-ac51b505e9a6@nvidia.com> <20181207191620.GD3293@redhat.com> <3c4d46c0-aced-f96f-1bf3-725d02f11b60@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 08 Dec 2018 16:33:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 07, 2018 at 11:16:32PM -0800, Dan Williams wrote: > On Fri, Dec 7, 2018 at 4:53 PM John Hubbard wrote: > > > > On 12/7/18 11:16 AM, Jerome Glisse wrote: > > > On Thu, Dec 06, 2018 at 06:45:49PM -0800, John Hubbard wrote: > [..] > > I see. OK, HMM has done an efficient job of mopping up unused fields, and now we are > > completely out of space. At this point, after thinking about it carefully, it seems clear > > that it's time for a single, new field: > > > > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > > index 5ed8f6292a53..1c789e324da8 100644 > > --- a/include/linux/mm_types.h > > +++ b/include/linux/mm_types.h > > @@ -182,6 +182,9 @@ struct page { > > /* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */ > > atomic_t _refcount; > > > > + /* DMA usage count. See get_user_pages*(), put_user_page*(). */ > > + atomic_t _dma_pinned_count; > > + > > #ifdef CONFIG_MEMCG > > struct mem_cgroup *mem_cgroup; > > #endif > > > > > > ...because after all, the reason this is so difficult is that this fix has to work > > in pretty much every configuration. get_user_pages() use is widespread, it's a very > > general facility, and...it needs fixing. And we're out of space. > > HMM seems entirely too greedy in this regard. Especially with zero > upstream users. When can we start to delete the pieces of HMM that > have no upstream consumers? I would think that would be 4.21 / 5.0 as > there needs to be some forcing function. We can always re-add pieces > of HMM with it's users when / if they arrive. Patchset to use HMM inside nouveau have already been posted, some of the bits have already made upstream and more are line up for next merge window. Cheers, J?r?me