Received: by 2002:a05:6a10:5c7:0:0:0:0 with SMTP id p7csp3378795pxt; Tue, 21 Sep 2021 16:52:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlliOcE4x/k4dCwi9V3xW7wtZaikjIISjHMpeDwdnVpKV2ntj+UyvNTyFBmXZpQveZ1tXk X-Received: by 2002:a17:906:d04f:: with SMTP id bo15mr38040440ejb.309.1632268326422; Tue, 21 Sep 2021 16:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632268326; cv=none; d=google.com; s=arc-20160816; b=baHl9ZH5uF8TpdHc8wmOZeTazRtfRX9hq8jAkLk+x4eH9HtPMV3I4ZxRl8C9Rbg8Jz pnRgnl3yw06/nDbJYr6U5M5YIjSIVRnLjK3gLNGzoD4EUczVLeJjzBdz19c9M49Q/t8p anHrADMLM4jEnJ4xJjAzJiwHyw+yVbKS6+cptBU4yMzamhJTfbdavjOe3PRa/QuTa58p rDWRBBHQgqp5O5qTchSbWG44KClxVx6PQmQWyHBofLKwTKOMoM2+RYyhfmugVlcvk726 2yNWcHUtj0b2jdj1RwlGU6g6X17emZ0kPlxg32nJsDm3aILNm+3tYJyz2EU2WFXnspC2 9zHQ== 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=HiQxvhVNzY5zCxIOTQQXBXxpp6b9FiVncQs/k+YKMCs=; b=uM8BmoClPsm0ZJ1xwDNkxHv6pV61t7tRfUw7N0uSM4kmG3081XSK32YUMAfPbLrgjU MNTak6wJlbRByd77GmyXsJt5DNXk7zeqN2m7xEzWjoLi4yBhlr4wuvKKxv7vahR7sGT5 TrW08jmYtWVt8xcPamBmCzEFB/ca1PkLlVq6hv90jvSYgzr1BqzWpmTgKCxgE8W35Xbq 6H9wgcIJCH0m9tQO3suBgStjKjOvVU/YKlGShkOthUpNM+fnc/C0TuGsOHj/C7r8gO9d cnVwFFVRnqOtm1QzfyocxDWT59XtirdiWf4sQKPDLNfsHKzCDAQ9MSDlR73D/dh7g5+Q kDuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KtfOAzcz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si609500edj.433.2021.09.21.16.51.42; Tue, 21 Sep 2021 16:52:06 -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=@gmail.com header.s=20210112 header.b=KtfOAzcz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbhIUVY3 (ORCPT + 99 others); Tue, 21 Sep 2021 17:24:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232729AbhIUVY0 (ORCPT ); Tue, 21 Sep 2021 17:24:26 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C506C061756; Tue, 21 Sep 2021 14:22:57 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id 194so1890502qkj.11; Tue, 21 Sep 2021 14:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HiQxvhVNzY5zCxIOTQQXBXxpp6b9FiVncQs/k+YKMCs=; b=KtfOAzczLf0S1BFbAIoiW4zxFBG8ZPjpN/NbomYKTWnPIVCMAtNq0RdMZhLGhVJ1hc CwrqXBaQaH56MD3t3h1VOqPW+ogAMHuAqPPWvb+fBNXuOlDTdbR+m1rUlANO1EZhkvf2 07iS3r4Amc/Mnr/Wwjw3RxZe6B795nGAzvDPzrgnZBKOk2nzYPp2UY9xe0FvMMH7+Vob cUDi1oJ7RLPrmZo0TevQ004ZHmoqtOBapYMUG8IKhBbNjDOmV/uVC6MvoeDGvBVB4TKO HUOAIwVMxXsl4pwYmHbTSVMIn/v5AvXoESuoav2TpB5ax/kXTczEiIggj/LNWwNLjBqi xLvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HiQxvhVNzY5zCxIOTQQXBXxpp6b9FiVncQs/k+YKMCs=; b=TbIgFgHzGvAp6t9sdhCAUfoaetcxChaCMNcp1nNICpOXA/NsISiiYIZC880MCveavD FEGMUwD7sgpapm6OsAZYGAb9wb/lu2oiE+7Ne01DwjkwcwLhFLjERpigCDMJ7WiLmc+W EradcDav987Ta9QpDXUUmXtRL+mwr+rl6xE1vtGDbtNxgBBgmSU3O+Aqq98YO9tCum3n mGpCip+3NXKvAtfwRR8CWBn8AMc43b2sTnEaqn/1Mp9Ogm8BWoRS7r1Jr2gFSSWVBpPm guwoDYIMn0rS5bgGVMgRq+/y83Jlf/9MQBQlkSKY81wX0LMEwfs/PDcidje76E5BkxlS gbDw== X-Gm-Message-State: AOAM5303jB85OBqFxpIyjM1d0rcwgcXU/zRua4QaPasW9p87A1gmvurJ xaL9LyEZnYvT49neUgVczg== X-Received: by 2002:a37:9c46:: with SMTP id f67mr4558769qke.98.1632259376788; Tue, 21 Sep 2021 14:22:56 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id s18sm127606qtn.46.2021.09.21.14.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 14:22:56 -0700 (PDT) Date: Tue, 21 Sep 2021 17:22:54 -0400 From: Kent Overstreet To: Linus Torvalds Cc: Johannes Weiner , Matthew Wilcox , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , David Howells Subject: Folios for 5.15 request - Was: re: Folio discussion recap - Message-ID: References: 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 Tue, Sep 21, 2021 at 05:11:09PM -0400, Kent Overstreet wrote: > On Tue, Sep 21, 2021 at 09:38:54PM +0100, Matthew Wilcox wrote: > > On Tue, Sep 21, 2021 at 03:47:29PM -0400, Johannes Weiner wrote: > > > and so the justification for replacing page with folio *below* those > > > entry points to address tailpage confusion becomes nil: there is no > > > confusion. Move the anon bits to anon_page and leave the shared bits > > > in page. That's 912 lines of swap_state.c we could mostly leave alone. > > > > Your argument seems to be based on "minimising churn". Which is certainly > > a goal that one could have, but I think in this case is actually harmful. > > There are hundreds, maybe thousands, of functions throughout the kernel > > (certainly throughout filesystems) which assume that a struct page is > > PAGE_SIZE bytes. Yes, every single one of them is buggy to assume that, > > but tracking them all down is a never-ending task as new ones will be > > added as fast as they can be removed. > > Yet it's only file backed pages that are actually changing in behaviour right > now - folios don't _have_ to be the tool to fix that elsewhere, for anon, for > network pools, for slab. > > > > The anon_page->page relationship may look familiar too. It's a natural > > > type hierarchy between superclass and subclasses that is common in > > > object oriented languages: page has attributes and methods that are > > > generic and shared; anon_page and file_page encode where their > > > implementation differs. > > > > > > A type system like that would set us up for a lot of clarification and > > > generalization of the MM code. For example it would immediately > > > highlight when "generic" code is trying to access type-specific stuff > > > that maybe it shouldn't, and thus help/force us refactor - something > > > that a shared, flat folio type would not. > > > > If you want to try your hand at splitting out anon_folio from folio > > later, be my guest. I've just finished splitting out 'slab' from page, > > and I'll post it later. I don't think that splitting anon_folio from > > folio is worth doing, but will not stand in your way. I do think that > > splitting tail pages from non-tail pages is worthwhile, and that's what > > this patchset does. > > Eesh, we can and should hold ourselves to a higher standard in our technical > discussions. > > Let's not let past misfourtune (and yes, folios missing 5.15 _was_ unfortunate > and shouldn't have happened) colour our perceptions and keep us from having > productive working relationships going forward. The points Johannes is bringing > up are valid and pertinent and deserve to be discussed. > > If you're still trying to sell folios as the be all, end all solution for > anything using compound pages, I think you should be willing to make the > argument that that really is the _right_ solution - not just that it was the one > easiest for you to implement. > > Actual code might make this discussion more concrete and clearer. Could you post > your slab conversion? Linus, I'd also like to humbly and publicly request that, despite it being past the merge window and a breach of our normal process, folios still be merged for 5.15. Or failing that, that they're the first thing in for 5.16. The reason for my request is that: - folios, at least in filesystem land, solve pressing problems and much work has been done on top of them assuming they go in, and the filesystem people seem to be pretty unanimous that we both want and need this - the public process and discussion has been a trainwreck. We're effectively arguing about the future of struct page, which is a "boiling the oceans" type issue, and the amount of mess that needs to be cleaned up makes it hard for parties working in different areas of the code with different interests and concerns to see the areas where we really do have common interests and goals - it's become apparent that there haven't been any real objections to the code that was queued up for 5.15. There _are_ very real discussions and points of contention still to be decided and resolved for the work beyond file backed pages, but those discussions were what derailed the more modest, and more badly needed, work that affects everyone in filesystem land - And, last but not least: it would really help with the frustration levels that have been making these discussions extroardinarily difficult. I think this whole thing has been showing that our process has some weak points where hopefully we'll do better in the future, but in the meantime - Matthew has been doing good and badly needed work, and he has my vote of confidence. I don't necessarily fully agree with _everything_ he wants to do with folios - I'm not writing a blank check here - but he's someone I can work with and want to continue to work with. Johannes too, for that matter. Thanks and regards, Kent