Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1276951pxb; Fri, 21 Jan 2022 14:08:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2QpbCsr8XO3+3DVQ94QvOHUwUs4RAW2KNitppB6tQbrYb+syoYjLLq5kmENXUEoP68Asp X-Received: by 2002:a17:90b:1a88:: with SMTP id ng8mr2630786pjb.221.1642802887040; Fri, 21 Jan 2022 14:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642802887; cv=none; d=google.com; s=arc-20160816; b=gCwOOJEKztH7+85xQQFlGDTayxCKaJKK7RtHMjiayaX4TfOzPFDnsqtsNuPEZ42a3Q NZdKJZbMgnU+qMz35ic8b96JXGLthhc9EO+JeaYj4e4r6S1+TzLSsZNOTyGwgRDHrNEg FJWY1Ht+IHy5vOy8UystP3bL1Gwp3rMybiidfm6mq8CeSlHdheJ1h2J5ikb4HbNEKBBg xOfZKejHfW4pR1RO6+k/EkVbxGleh6A5ha8ymgfrpF0jjNjXdElp0jt6dGJe/sGTzfxu uYs7Dee6PQX86JsPV7OCncaN/bWkCwv9rLlZS8aUufjWNUY3tPQmVu9DpXW/QQC9xok6 or+w== 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=weO+je4/1y+8GovrROQPY/ynyjtD2DcyE7cAMMlyB1Q=; b=H+XnPsqjvZMgPZSqJxvJ8eoRqVPqZcnyce2XuWqQQLdAi+dDzp4az/AArm/lwaC33w TuVPkAg/jEinKtZv3bRGdRGGDb+3d4TZLsQinzfzqpo28mm4qQdKW/oWG96VgAYGy8HZ WaRR8deC6pEmHpwcZhoscSkmml91OqCcpq+KjvwzqYlx0jKQ75Sf3eaZ6nLOwKfvn4rW 72NNvLxskEohrMxv14DOh9daWRFquQpRc0QTdd1AhrHI9jUF4BKQces2sJqwd/xHCCX/ TKbrclnQWaHE8D1Wcygixrr2nv+E3lsYD7vvau+b8TM0BYyYeHO4GcusV4Y+9RK27HhH 853w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="u7ni/Xvd"; 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 n6si7058998plk.619.2022.01.21.14.07.55; Fri, 21 Jan 2022 14:08:07 -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="u7ni/Xvd"; 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 S236317AbiATN2M (ORCPT + 99 others); Thu, 20 Jan 2022 08:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235902AbiATN2K (ORCPT ); Thu, 20 Jan 2022 08:28:10 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B5B5C061574 for ; Thu, 20 Jan 2022 05:28:10 -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=weO+je4/1y+8GovrROQPY/ynyjtD2DcyE7cAMMlyB1Q=; b=u7ni/XvdlWLw11IVs5pMAj+vjZ PMeJ/hybbB1riIYjy6i1kSRg08W1NeyRrNgMzFVT9JEfzWAf/lPSz3iR9R9k2ytEuQFC/Pmoeu/CL Mc3WRRZq0+p7PoSqdGSVEcgeWYgPAyhpUCbAhv7GRBOsa4Ucd/Q10tZBgpjhz+oiPexmDQfwetggi 1pBhidvz9OAvBST9pjcJ7zlBrIg5e33hEAJeooj+rVlqNi1+zfYpTPz6aqMeNxbyKanJPfi2e962K lbD0k6F3iByeSUqvhEE5InF4X8Ps8sOy3/+lSxKK6dujAnKGWGVOtT+ZJ9e0Z1hqBDLTRXSuzILyN GFrMy84g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAXTa-00EHn0-Vb; Thu, 20 Jan 2022 13:27:43 +0000 Date: Thu, 20 Jan 2022 13:27:42 +0000 From: Matthew Wilcox To: alexs@kernel.org Cc: 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: <20220120131024.502877-2-alexs@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.