From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D85C0C433F5 for ; Thu, 20 Jan 2022 13:28:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4007C6B0098; Thu, 20 Jan 2022 08:28:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3893D6B0099; Thu, 20 Jan 2022 08:28:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 229BE6B009A; Thu, 20 Jan 2022 08:28:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 105A66B0098 for ; Thu, 20 Jan 2022 08:28:14 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C6C71181CAEF9 for ; Thu, 20 Jan 2022 13:28:13 +0000 (UTC) X-FDA: 79050744066.10.445F5DD Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id D4B7F4004B for ; Thu, 20 Jan 2022 13:28:12 +0000 (UTC) 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> X-Stat-Signature: abn4dpq67hzbedxxfyjadk6sja91no4o Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="u7ni/Xvd"; dmarc=none; spf=none (imf27.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: D4B7F4004B X-HE-Tag: 1642685292-649816 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.