Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1394341pxb; Fri, 21 Jan 2022 17:31:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVfdwjN8itcynkEl7e/8t6Xv5zv2pRgE+2JFT5wLT9R07UCxd5cNCzUMiTnI1Tsxek6LoZ X-Received: by 2002:a17:902:b718:b0:143:72b7:409e with SMTP id d24-20020a170902b71800b0014372b7409emr6004534pls.28.1642815106985; Fri, 21 Jan 2022 17:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642815106; cv=none; d=google.com; s=arc-20160816; b=IQIXYQ5eO3RnQ/g6tjstki/4gkYKTJjSmmNZyHL9213+FZuYpQtPxJibBsue9rwy+e ZvKZA2GJSyJYK+w2Ch1kJN4O7y74oCpFjh6gQzTFa7SA0Au62UgTKB21JQpphgW8WHmc MyeuHTCLv+sjBfReCoBEKySIRCNFnw3CyBxajzTlTOGjaK0Uuw0GVcWNYanltrnTb4sk sMlhgPO17IBg9vfn/nQXDcZ3wEA7MxfIVDih+dMualuoMQ0UgEZsKXAgZJpbD+8ljcB6 6e5nGifMW/ULeLYqAZLoAPXw/AFdnCBhPDR/mnwPyzIU3qv6wMvqYoiO9g4rUXLCGKcm ARHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CDfqQpaNyR1slLKbCMM+fTwMTmvDRMkpoYbrFNKkvZY=; b=JFYswVSCN07e6YZkkselvpVSV5HEPRmQS+HX+/r+ZffJkBRXoWyEal8pgbDIYhoqae b9L22CaASiG+wp2pG0EZBwlDA7XhtEMjjJyQ0vCkb4zX1LXUSKxFyJmBHOZbOBQaA327 sTQLFM4IiJNQ8UpjfAxkLYE/IZ7wBJhGPLcf6kLo7uUf8fGcIi1LMtDVwowfkAZB1Blt a2Bjaz61DZUrFG+sppB3QVmnAMumzxKXd0F3k5OYO4G50Csb49ySZRdhQvuKCWZj5wJ/ FZMVZS4BGsSCHm3rogmOkwH/Tdb3sFuvoRwbzQmhL83LqOb6IR0W1E2cqNMFehmfZPe0 zB8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oPL9RCoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si8094025pgv.33.2022.01.21.17.31.35; Fri, 21 Jan 2022 17:31:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oPL9RCoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380624AbiAUNUL (ORCPT + 99 others); Fri, 21 Jan 2022 08:20:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380585AbiAUNUK (ORCPT ); Fri, 21 Jan 2022 08:20:10 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4AC4C061574 for ; Fri, 21 Jan 2022 05:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CDfqQpaNyR1slLKbCMM+fTwMTmvDRMkpoYbrFNKkvZY=; b=oPL9RCoC3bmiGjc9zs/xXLLu6t RrU5fSaK51OMQoFsmDq/6gdkjgbIfp1JZ1TfjII7ODpxtj1dJDSqZ9IhMLBePZai0otqc2gSTt6rI PQwWuKHlFEA1dX7PDZEFb5Ao0vcuGrxWYyZE95DPbV3+QRI+oziOAgp35cj8K2n/W+Rydl7LLfVmE fHXc4xNUrpD0H9fGn9GlWe+/oPCE48FweJaVkdH4AJdPyQLKIJ1UztOBqs8nTlV7pOva3tmxcLxc6 gT69vBqwtS66Qm+voYQzTJbhi+tHlPsvo6/8V/ckG+RJuM6xMkwhbLalRTDBwqm0rn+q8gtEK7hiW AECR4Zhg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAtpL-00Fcbj-Fu; Fri, 21 Jan 2022 13:19:39 +0000 Date: Fri, 21 Jan 2022 13:19:39 +0000 From: Matthew Wilcox To: Alex Shi Cc: Alex Shi , Andrew Morton , Steven Rostedt , Ingo Molnar , Naoya Horiguchi , Yu Zhao , Arnd Bergmann , Vlastimil Babka , Mel Gorman , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/5] mm: remove page_is_file_lru function Message-ID: References: <20220120131024.502877-1-alexs@kernel.org> <20220120131024.502877-2-alexs@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 03:02:12PM +0800, Alex Shi wrote: > On Thu, Jan 20, 2022 at 9:28 PM Matthew Wilcox wrote: > > > > On Thu, Jan 20, 2022 at 09:10:20PM +0800, alexs@kernel.org wrote: > > > From: Alex Shi > > > > > > This function could be full replaced by folio_is_file_lru, so no reason > > > to keep a duplicate function. > > > > This is not a helpful way to do this kind of replacement. > > > > Instead of choosing a function to remove and doing a blind replacement, > > choose a call site and convert the whole calling function to use folios. > > Once you've removed all callers, you can remove the wrapper function. > > > > Also, a number of changes here will conflict with patches I've already > > posted. Try doing change_pte_range() in mprotect.c to get a feel for > > how to convert a function entirely to folios. > > Hi Willy, > > Thanks for your comments! > > The patchset did the thing as you required "convert the whole calling > function to use folios. then remove the wrapper function" on yesterday's > Linus and next tree, that included your patchset "Page cache/iomap for 5.17". That's not what I meant. What I meant is you're currently doing: - Find folio wrapper function - Inline it into all callers - Delete wrapper function That creates a lot of churn and not a lot of improvement. What would be helpful is doing: - Find folio wrapper function - Find a caller, convert it from using pages to using folios That's harder, but it actually accomplishes something (ie auditing a function to make it work with folios). These wrapper functions are signals that the callers need to be converted to use folios. > Is the conflicting patch "Enabling large folios for 5.17" or others? Sorry > for can't check everyone, your patches are many. If just the former, I see > you mentioned: "I'd be uncomfortable seeing it merged before 5.18". > Would you point out which of your patches was interfered or blocked? The GUP series was the specific series that this conflicted with. And yes, I have a lot of patches outstanding in this area. That's a sign that small cleanup patches aren't going to be welcomed because they're going to conflict with meaningful patches. > And yes, replacing page functions in change_pte_range is a bit harder, > but it seems it has no much relation with this trival patchset. That is, indeed, the point.