Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3103001imu; Mon, 17 Dec 2018 13:22:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/UHqhkxl9DLixTsHQNtZJvZONqXZBXWFFLL3p1YfLG7MfXv6ykkHBSwz+j8XqfFCkrMqjrt X-Received: by 2002:a17:902:3f81:: with SMTP id a1mr13850723pld.258.1545081770073; Mon, 17 Dec 2018 13:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545081770; cv=none; d=google.com; s=arc-20160816; b=ZKPCtdabcMMAtCj3odlkVHv2RosGS/sgnJaJBNNRBZjhmQ0Y95cHekmL2uc7vpxvQi W0cedjaRDOYh2oKDDsJ6UEaPs+AWPqNMvL82NDQKzN7i8tJ8qPDIQWKN2/GX0aVcn/+B GDIh5cqNo0oN4LdnK10wysTQYQ/A2YXpto5mmENrc1IH+qzDgWl6CSmmfJmQsWPLrToO +zdfLyxXJJPuUQNOfW2cwRDCF8Sg8A4BmdJbFeqVKTabOOVTq0yksAHbPNx+KtHAmXEn C4zgtElLO0iaWlHiHZa2cqMIYAuUjM4WJSdfAD+6g9Mlq1rOZwKTaolJPZMsR1iANiDS gheg== 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=ALYIMNlZxPmsNO7e3uILDX7gnxGKcV5ak4kAV2uqMME=; b=b5YskbIlDaxm8td/VWtaCmVq6IovdNSqdSWM9itVTYjk/cTTi7I2hPmNBmJarNexht PxrjJQ2aq4dRLs/ucGfQeZBRT26zYbcC9rB7w7Nfrk7QsrXBazDhUrq8FMVaA72RIdFo XoNFEsrCdAxG8hMSzewwB1B/HEtOD8WSuT/16k7dD3EP9Ss9ypU5FXq0lHb60R7Q25PO CfzYXS6er31Er166ArmQXRwunh68SLVkDVv7L92Kqxe24CpfGYwIB8X4kRz4knvcT8OZ /jlqLja/XAATxtNFLXaki1kfz2Ncmi611VUdruzpQvREaA7Cz7zHuoeVP6+23qv0f2/E VWlQ== 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 a1si11498804pgk.495.2018.12.17.13.22.35; Mon, 17 Dec 2018 13:22:50 -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 S2388441AbeLQUzH (ORCPT + 99 others); Mon, 17 Dec 2018 15:55:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388315AbeLQUzH (ORCPT ); Mon, 17 Dec 2018 15:55:07 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E266AB42D; Mon, 17 Dec 2018 20:55:06 +0000 (UTC) Received: from redhat.com (ovpn-125-170.rdu2.redhat.com [10.10.125.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F9E61001640; Mon, 17 Dec 2018 20:55:03 +0000 (UTC) Date: Mon, 17 Dec 2018 15:55:01 -0500 From: Jerome Glisse To: Matthew Wilcox Cc: Dave Chinner , Jan Kara , John Hubbard , Dan Williams , John Hubbard , Andrew Morton , Linux MM , tom@talpey.com, Al Viro , benve@cisco.com, Christoph Hellwig , Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Jason Gunthorpe , Michal Hocko , mike.marciniszyn@intel.com, rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181217205500.GD3341@redhat.com> References: <20181212150319.GA3432@redhat.com> <20181212214641.GB29416@dastard> <20181214154321.GF8896@quack2.suse.cz> <20181216215819.GC10644@dastard> <20181217181148.GA3341@redhat.com> <20181217183443.GO10600@bombadil.infradead.org> <20181217194759.GB3341@redhat.com> <20181217195150.GP10600@bombadil.infradead.org> <20181217195408.GC3341@redhat.com> <20181217195922.GQ10600@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181217195922.GQ10600@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 17 Dec 2018 20:55:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 17, 2018 at 11:59:22AM -0800, Matthew Wilcox wrote: > On Mon, Dec 17, 2018 at 02:54:08PM -0500, Jerome Glisse wrote: > > On Mon, Dec 17, 2018 at 11:51:51AM -0800, Matthew Wilcox wrote: > > > On Mon, Dec 17, 2018 at 02:48:00PM -0500, Jerome Glisse wrote: > > > > On Mon, Dec 17, 2018 at 10:34:43AM -0800, Matthew Wilcox wrote: > > > > > No. The solution John, Dan & I have been looking at is to take the > > > > > dirty page off the LRU while it is pinned by GUP. It will never be > > > > > found for writeback. > > > > > > > > With the solution you are proposing we loose GUP fast and we have to > > > > allocate a structure for each page that is under GUP, and the LRU > > > > changes too. Moreover by not writing back there is a greater chance > > > > of data loss. > > > > > > Why can't you store the hmm_data in a side data structure? Why does it > > > have to be in struct page? > > > > hmm_data is not even the issue here, we can have a pincount without > > moving things around. So i do not see the need to complexify any of > > the existing code to add new structure and consume more memory for > > no good reasons. I do not see any benefit in that. > > You said "we have to allocate a structure for each page that is under > GUP". The only reason to do that is if we want to keep hmm_data in > struct page. If we ditch hmm_data, there's no need to allocate a > structure, and we don't lose GUP fast either. And i have propose a way that do not need to ditch hmm_data nor needs to remove page from the lru. What is it you do not like with that ? Cheers, J?r?me