Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1893239ybl; Thu, 29 Aug 2019 00:01:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzwoaM/s3dHJ27ZMkrVDgWxB+IC6XqoTaXLQLio1+8IzAY3CixtCgdjLCUggdSeWjmLu1H X-Received: by 2002:a62:7e11:: with SMTP id z17mr9124052pfc.211.1567062078896; Thu, 29 Aug 2019 00:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567062078; cv=none; d=google.com; s=arc-20160816; b=pM/lYPoRqe5EsENAmy7DZCRYG5YTZ0q0DDkv93zEMTtArwLPNELRltKRzRzhqvDMSB PhITJW6WFa74XdoOqPMa5rNhn6RhM4RtCfge30uuS4vQk+Czj7tVqcpwjohIMA8KrVhf 1Gg1DfrcWPwLSyR99xNhyxbTe7Dv0dhwmtKCj87b4zZZv7FeXC4vEGgK6hH74gsgD3eI zltQuodA7BUrDXGCL/LAOI1OZEsC0RQkXVhRaMMxfezWH34kAiEZtFT7BV1uhKSkBl3E 8LR2k9OnusJV/FPRNsISvWqEog0Jr6H8G9EBbxIEJ/gvPdUcfq/7T1D90N0GZ6Tn7Sfa E+lA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Oogqxh5LyoOkrZlioWc6NBPC81vwy+b038HS9gb7uiM=; b=IUN8oYHZ7f4ouDqwQvhCIA5sGfP4BYIWFLyymWDzg3zqHviI+ZUplZpmVSYya6ww8z mvC/LXKKC/uy8/aOHA13FQ11y1L36AjjO1Z7lPJz3a/0EcCBkDTLfrTApJj1Mrmljk3R uOZ5nTuXONQh42rfhIDg0thf0KAC4uZmR6BqWU3BXwiNPFox6Id8vdi2OYezHq8XPORG 6gtYJn6Nh47Hlm6q9R+t52Rlx9AoK2oDHf4BQc66v3hzhvb0fGxsOixEDSzk0vQ6Mt5+ W2S/c65dk0iD4sAyREHreVewu5ht7bxv/OruatggCvS0hvaS/K2vjUUQBOal08AvRVSs 2kOw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si1232637pgk.293.2019.08.29.00.01.02; Thu, 29 Aug 2019 00:01:18 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727235AbfH2HAG (ORCPT + 99 others); Thu, 29 Aug 2019 03:00:06 -0400 Received: from verein.lst.de ([213.95.11.211]:43581 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfH2HAG (ORCPT ); Thu, 29 Aug 2019 03:00:06 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id D92A468C4E; Thu, 29 Aug 2019 08:59:59 +0200 (CEST) Date: Thu, 29 Aug 2019 08:59:59 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Linus Torvalds , Andrew Morton , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Jerome Glisse , Steven Price , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Thomas Hellstrom Subject: Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data Message-ID: <20190829065959.GA11628@lst.de> References: <20190828141955.22210-1-hch@lst.de> <20190828141955.22210-3-hch@lst.de> <20190828150514.GN914@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190828150514.GN914@mellanox.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 03:05:19PM +0000, Jason Gunthorpe wrote: > > @@ -1217,7 +1222,8 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, > > 0, NULL, mm, 0, -1UL); > > mmu_notifier_invalidate_range_start(&range); > > } > > - walk_page_range(0, mm->highest_vm_end, &clear_refs_walk); > > + walk_page_range(mm, 0, mm->highest_vm_end, &clear_refs_walk_ops, > > + &cp); > > Is the difference between TASK_SIZE and 'highest_vm_end' deliberate, > or should we add a 'walk_all_pages'() mini helper for this? I see most > of the users are using one or the other variant. I have no idea to be honest. A walk_all_pages-like helper doesn't seem like a bad idea, but the priority seems lower than cleaning up all the callers using walk_page_range on a vma..