Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp110328pxb; Wed, 24 Feb 2021 20:09:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwan0OFMCDilvouuJ0x7rE0PTS6RcXSQ7CJu13ZhQtiE0oP/yx04t6WBZGDv86lzuzO18Cj X-Received: by 2002:aa7:db16:: with SMTP id t22mr1025729eds.178.1614226190145; Wed, 24 Feb 2021 20:09:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614226190; cv=none; d=google.com; s=arc-20160816; b=e1WaJbtejvSLUAqRF63CsE0kGeh5WeltsvjqQR4+9rnUPe2PzYtoX1ZQF56i+ktlPn PHDlh6piQGfLb6dmNoM/69+Hc9PgeQ5UwGNkD4/8woZrz+IyREG38JsbUoZxCaxipzBj +lfCYR/HrfCMDWp1Ce4RoyzXqdHZbpP/MSFF7hGH2rgKhNfLyFZRxw2Yy7JzwL1Qk2nw +UyDt8pwbLJ7ltxR6PCagbqFL8I3L/Kk3/Rh6slTVw1jLhdbOmbtYKYr5ntdU3yyJQX8 hw7j+iDv8UDyB6WC0uJVL/+BnnEpP5GAe6jKN+H96tpXItRX8bYYK5amoLbZjRnaTSUl cysg== 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=XbA6TlSG8cohloQ6JT5bPa8tRn+Sri1QB1baZ+jGvOo=; b=sHhoP/oFDS9IoxJ4OJO5tpkGPZL1m3S4BngNXhcKwodmKgXp8vmVWQ+cSaLOMo7YEi KVFRRM6pxfIdK/s+X5pehmGcd1OnB3TOnAM4+mQYDdAM+9Ms4MfNIWstl6f4NowLomPS hDjlLy/OPRoNfsC3eU1iUzc9/JSnJm6YjTK/20SSjVbek3LQR31KWJmeIb1WOE7MPkqA 8+CIVqc9+lZpTRo8VwblggBfuq3PvOpycsnVJvxkSJ2dKPahZktQ4TImG0b2hnqzt7EU 6zRbTjk9MdqkXJuieifzZlDe4evvYsEe6bBXJGBj67IjKttxuCK5RMf7kx58AsDfqLTF nmBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a+t3MaKC; 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 dn20si2713794ejc.418.2021.02.24.20.09.26; Wed, 24 Feb 2021 20:09:50 -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=a+t3MaKC; 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 S235430AbhBXWtq (ORCPT + 99 others); Wed, 24 Feb 2021 17:49:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235365AbhBXWtq (ORCPT ); Wed, 24 Feb 2021 17:49:46 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD4E0C061574 for ; Wed, 24 Feb 2021 14:49:05 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.