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 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1416AC433E6 for ; Mon, 1 Mar 2021 20:26:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9462764DCF for ; Mon, 1 Mar 2021 20:26:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9462764DCF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CC3238D009E; Mon, 1 Mar 2021 15:26:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C4CDE8D0063; Mon, 1 Mar 2021 15:26:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC6E98D009E; Mon, 1 Mar 2021 15:26:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 93C348D0063 for ; Mon, 1 Mar 2021 15:26:47 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 543B93622 for ; Mon, 1 Mar 2021 20:26:47 +0000 (UTC) X-FDA: 77872438854.09.A5AD349 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id B8931FC for ; Mon, 1 Mar 2021 20:26:46 +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=DvWGgpKtXTOvADzPXHriNsep/KrNhQRbYsqcSSnqiWA=; b=H8fTjyuEpILjyyECXnGLFnF0vf pJAnpav9KcLAdaqDQ5x6/JdLogJqwCBnRoEeOLW9sK63aFlS6JDsoFdNJGlZVzS7XiKaUouMro8vB 4azhBWdbODada/n/EG8SCMW4el7x78lxG+0EFemCZ1iwJynojdxMGd+HAG+rmY2CBUUbOvFc5KmKE udalKg+pT4egJCnG5fQSgP9r/6DLmvWQ25BQpoU2y1V6bA3P79eK2pL4YhphP5q39kknMUK7FQcVU AZaSe4B1cUDxjAx2oeK6F3lBPEUWr3BFy28amEXG2I+fBGXsEUWxI3f46ILKpsC0SLyyPz9PbkcRc X9UhPYog==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lGp7S-00GBhb-HS; Mon, 01 Mar 2021 20:26:23 +0000 Date: Mon, 1 Mar 2021 20:26:18 +0000 From: Matthew Wilcox To: Hugh Dickins Cc: Yu Zhao , "Kirill A. Shutemov" , akpm@linux-foundation.org, alex.shi@linux.alibaba.com, vbabka@suse.cz, guro@fb.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, vdavydov.dev@gmail.com Subject: Re: [PATCH v2 3/3] mm: use PF_ONLY_HEAD for PG_active and PG_unevictable Message-ID: <20210301202618.GT2723601@casper.infradead.org> References: <20210224084807.2179942-1-yuzhao@google.com> <20210226091718.2927291-1-yuzhao@google.com> <20210226091718.2927291-4-yuzhao@google.com> <20210226121314.GB2723601@casper.infradead.org> <20210301115007.mgw5vthgjoibnjf4@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B8931FC X-Stat-Signature: k3uiupqatrpt48ncur3uqanjuqkqfqiz Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614630406-954121 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 Mon, Mar 01, 2021 at 12:16:19PM -0800, Hugh Dickins wrote: > On Mon, 1 Mar 2021, Yu Zhao wrote: > > On Mon, Mar 01, 2021 at 02:50:07PM +0300, Kirill A. Shutemov wrote: > > > On Fri, Feb 26, 2021 at 12:13:14PM +0000, Matthew Wilcox wrote: > > > > On Fri, Feb 26, 2021 at 02:17:18AM -0700, Yu Zhao wrote: > > > > > All places but one test, set or clear PG_active and PG_unevictable on > > > > > small or head pages. Use compound_head() explicitly for that singleton > > > > > so the rest can rid of redundant compound_head(). > > > > > > > > How do you know it's only one place? I really wish you'd work with me > > > > on folios. They make the compiler prove that it's not a tail page. > > > > > > +1 to this. > > > > > > The problem with compound_head() is systemic and ad-hoc solution to few > > > page flags will only complicate the picture. > > > > Well, I call it an incremental improvement, and how exactly does it > > complicate the picture? > > > > I see your point: you prefer a complete replacement. But my point is > > not about the preference; it's about presenting an option: I'm not > > saying we have to go with this series; I'm saying if you don't want > > to wait, here is something quick but not perfect. > > +1 to this. page folios are here and ready to go. I'm doing another pass on them, quantifying the improvements to text with each patch. So far I'm at 4357 bytes of text saved, in the first 10 patches (many of which look as if they're not going to produce any savings). Yu Zhao's patches seem risky. The only way to know if any places have been missed is by enabling CONFIG_DEBUG_VM_PGFLAGS, which we do not recommend for production environments.