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.5 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 CC051C433DB for ; Wed, 24 Feb 2021 22:49:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6960F64F06 for ; Wed, 24 Feb 2021 22:49:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6960F64F06 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 DDEB36B0005; Wed, 24 Feb 2021 17:49:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D90B26B006C; Wed, 24 Feb 2021 17:49:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA6836B006E; Wed, 24 Feb 2021 17:49:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id B19996B0005 for ; Wed, 24 Feb 2021 17:49:10 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6E6F5182332F3 for ; Wed, 24 Feb 2021 22:49:10 +0000 (UTC) X-FDA: 77854653660.14.988BE54 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf22.hostedemail.com (Postfix) with ESMTP id A8B98C0007C0 for ; Wed, 24 Feb 2021 22:49:04 +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=XbA6TlSG8cohloQ6JT5bPa8tRn+Sri1QB1baZ+jGvOo=; b=a+t3MaKCLIK05PAG+wf61LEp8K meEktumY8DILhz0wq75h3QK/pQO3p3eXgxKQ7XEdzEJvlcXsJcPRYoazZPHkWOaFD+Xy40jm0JNGm IPlguJbKbGEnCCbHIWTC3sOG+l7V+IQJWwyt+UOAJXYJcJ2K0cmZYsRMQmsYhFCwaIXMAEk2cZJik ooNlOiSKQe5oyv2eW8zUHqrxjv87kTrSykgDGiqGVPZBKSw/Q6x2qQ52ZoUErDvVwzvZuqcmM1jWk KA5ThEZL12MJc6x144zNuY9pOEcYyDfbluwDTbg2DAJSQNkKbfmlT45m02bwOZ1x7Tw3m2Y4j/Cxb U45S6V1Q==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lF2xa-009z1I-Ce; Wed, 24 Feb 2021 22:48:49 +0000 Date: Wed, 24 Feb 2021 22:48:46 +0000 From: Matthew Wilcox To: Yu Zhao Cc: Andrew Morton , vbabka@suse.cz, alex.shi@linux.alibaba.com, guro@fb.com, hannes@cmpxchg.org, hughd@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, vdavydov.dev@gmail.com Subject: Re: [PATCH] mm: test page->flags directly in page_lru() Message-ID: <20210224224846.GU2858050@casper.infradead.org> References: <20210122220600.906146-11-yuzhao@google.com> <20210224084807.2179942-1-yuzhao@google.com> <20210224051558.79e31c60eea2c088f4a1b300@linux-foundation.org> <20210224215639.GT2858050@casper.infradead.org> 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: A8B98C0007C0 X-Stat-Signature: oi6r1yg9tdof46sk5ja8atfgujtwsq1w Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614206944-237312 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 Wed, Feb 24, 2021 at 03:34:16PM -0700, Yu Zhao wrote: > > If only somebody were working on a patch series to get rid of > > all those calls to compound_head()! Some reviews on > > https://lore.kernel.org/linux-mm/20210128070404.1922318-2-willy@infradead.org/ > > would be nice. > > I'm on board with the idea and have done some research in this > direction. We've found that the ideal *anon* page size for Chrome OS > is not 4KB or 2MB, but 32KB. I hope we could leverage the folio to > support flexible anon page size to reduce the number of page faults > (vs 4KB) or internal fragmentation (vs 2MB). > > That being said, it seems to me this is a long term plan and right > now we need something smaller. So if you don't mind, I'll just go > ahead and remove compound_head() from Page{LRU,Active,Unevictable, > SwapBacked} first? It's really not a big change I'm suggesting here. You need https://lore.kernel.org/linux-mm/20210128070404.1922318-2-willy@infradead.org/ https://lore.kernel.org/linux-mm/20210128070404.1922318-5-willy@infradead.org/ https://lore.kernel.org/linux-mm/20210128070404.1922318-8-willy@infradead.org/ and then the patch I sent above to create folio_lru(). Then any changes you want to make to use folios more broadly will incrementally move us towards your goal of 32kB anon pages.