Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3782991pxf; Mon, 15 Mar 2021 19:36:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznLvD/hH3QlvtoMRj9f1rrcjcYJfa/szeWoT3Kb4QsKuYyKu3vS1Q9XQcEceB/YYxsXohn X-Received: by 2002:a17:906:3159:: with SMTP id e25mr17064741eje.303.1615862190578; Mon, 15 Mar 2021 19:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615862190; cv=none; d=google.com; s=arc-20160816; b=id7KRfjG6DnWD6Xt3UizEwspmuE6wUcpBu9H10BYDJhD13KcUezG0JLTM3K4cBBvic EYF3RvklBphScxoft0HS5VvWYRe/7JMHjvAG2fpEuMpRugYaG/UEWPeQmFLeW6c9hA9u xEdFM1a9L97BcaXn6VxzC+TOeLKLXBSug/5OlQ2//hvzED+lkDBrddTWiw0S2UVF9Nvr /MM0Fuqm4S8XQvGsgpyNNTBiL3E/EWTakH3hVbga5CwrWeba2aHZzKCXuwbatVrHQFMl rOYMs38EKPpHm6DSDa0iPk1AmtCAaf0z3WPe7z9u3TKh18gA5M9y8UXTDMGKwuuaNPkl 0cnw== 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=12+6Ush9hX1Ewkklvi8wTA42vfuCkxo+PweocyhvKNY=; b=iKKzYjneC65ugyR8vNurSRgDVxcy9gjxwq71yRMzwMKqHgxFCo7PSTbBtJ66tHtudp qLjyfpmcNAo/CQmDQdAELRtUw9A8vVeKKiOvMhWZIL58++2MrMXHRPtA7M3Grr6lVI4K BesHiyRwLNIxyCxl6YnPyAejuWXserR/xBfODgokOKf5pSNxAFAfEbw5j+YmMXzwHa0y wFGp82UqoW3O+nl+S/BwhUC3QwrUCKCTVJmPb1+XcVXUJ9K+veCGWHi/WC7LqMOyQK9m sBxcnCYLLA2yWT8VFraERFv7BDSLQSiHcoLJ4A82uyiGF0ax0GDX2Z+pG6CGZTpCxxuc t8fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=LSYjZJ1P; 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 bw19si12318269ejb.85.2021.03.15.19.36.08; Mon, 15 Mar 2021 19:36:30 -0700 (PDT) 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=LSYjZJ1P; 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 S232733AbhCOTlQ (ORCPT + 99 others); Mon, 15 Mar 2021 15:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233717AbhCOTlJ (ORCPT ); Mon, 15 Mar 2021 15:41:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D17C06174A; Mon, 15 Mar 2021 12:41:09 -0700 (PDT) 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=12+6Ush9hX1Ewkklvi8wTA42vfuCkxo+PweocyhvKNY=; b=LSYjZJ1PS3v9Llm7VndY/q4cXy j0KkqBeKB7gNp9++92jjLflydlcCnykyajon27zQHRsSzRs/d0hmw4XgqvFPNS5OUI9H1zAgglEBv i7rwkWjTQ3h7xBr1H7pjCoaj9Q+b5DHmWOleFGfV5DEx4ktk0tSHlZrhE5LifZqCeSE4XhuRaCP81 5jvejFphWh+xdcxIKMxBeBRidvye+FYk3PnOcESZgFGQLj5pkCT6rHlyUZRu6U5ugF+eEU2dFLE8u KMKI1lNZj/XgwsurcWNVijyf1S7lKzzBj/YC0a+OpqntC1BxLi0u25KCyPrpgnXrggwRXAkLzlNcp WSIfHVCw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lLt4Y-000feN-QM; Mon, 15 Mar 2021 19:40:19 +0000 Date: Mon, 15 Mar 2021 19:40:14 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: Michal Hocko , "Kirill A. Shutemov" , Hugh Dickins , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 00/25] Page folios Message-ID: <20210315194014.GZ2577561@casper.infradead.org> References: <20210305041901.2396498-1-willy@infradead.org> <20210313123658.ad2dcf79a113a8619c19c33b@linux-foundation.org> <20210315115501.7rmzaan2hxsqowgq@box> <20210315190904.GB150808@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315190904.GB150808@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 07:09:04PM +0000, Christoph Hellwig wrote: > On Mon, Mar 15, 2021 at 01:38:04PM +0100, Michal Hocko wrote: > > I tend to agree here as well. The level compoud_head has spread out > > silently is just too large. There are people coming up with all sorts of > > optimizations to workaround that, and they are quite right that this is > > somehing worth doing, but last attempts I have seen were very focused on > > specific page flags handling which is imho worse wrt maintainability > > than a higher level and type safe abstraction. I find it quite nice that > > this doesn't really have to be a flag day conversion but it can be done > > incrementally. > > > > I didn't get review the series yet and I cannot really promise anything > > but from what I understand the conversion should be pretty > > straightforward, albeit noisy. > > > > One thing that was really strange to me when seeing the concept for the > > first time was the choice of naming (no I do not want to start any > > bikeshedding) because it hasn't really resonated with the udnerlying > > concept. Maybe just me as a non native speaker... page_head would have > > been so much more straightforward but not something I really care about. > > That pretty much summarizes my opinion as well. I'll need to find some > time to review the series as well. If it's easier for you, I'm trying to keep https://git.infradead.org/users/willy/pagecache.git/shortlog/refs/heads/folio up to date. Not all of those 111 patches are suitable for upstreaming, but it might give you a better idea of where I'm going than if I only posted the first 70-80 of them. Stopping at "mm/memory: Use a folio in copy_pte_range()" nets us almost 10kb of text reduction for the UEK-derived config, about 3.3kb on an allnoconfig (which is a little over 0.1% on a 2.4MB kernel). The reason I didn't go with 'head' is that traditionally 'head' implies that there are tail pages. It would be weird to ask 'if (HeadHead(head))' That's currently spelled 'if (FolioMulti(folio))'. But it can be changed if there's a really better alternative. It'll make me more grumpy if somebody comes up with a really good alternative in six months. I would agree that the conversion is both straightforward and noisy. There are some minor things that crop up, like noticing that we get the accounting wrong for writeback of compound pages. That's not entirely unexpected since no filesystem supports both compound pages and writeback today.