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=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 5F9CCC433F5 for ; Thu, 16 Sep 2021 17:15:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 069E160EFF for ; Thu, 16 Sep 2021 17:15:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 069E160EFF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5356E6B0071; Thu, 16 Sep 2021 13:15:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E52E6B0072; Thu, 16 Sep 2021 13:15:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D43A940007; Thu, 16 Sep 2021 13:15:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 30F6F6B0071 for ; Thu, 16 Sep 2021 13:15:19 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E819118211CD9 for ; Thu, 16 Sep 2021 17:15:18 +0000 (UTC) X-FDA: 78594087516.38.0A0AFDC Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by imf04.hostedemail.com (Postfix) with ESMTP id 9479150000B3 for ; Thu, 16 Sep 2021 17:15:18 +0000 (UTC) Received: by mail-qv1-f43.google.com with SMTP id 62so4597674qvb.11 for ; Thu, 16 Sep 2021 10:15:18 -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:content-transfer-encoding:in-reply-to; bh=F1dJN61v4a5HavamkHN7ACFSKiKkM/zUmpKZlIwuGio=; b=HdcVwodHBTqTcKj9a4KQNQ9TZ9py7/8rywZo2MLdkVpA5JTYsTHiPcov76FAibXmEV rItqYaYOlklvI4WrzkJOFWUMWZVbk/ripAAflVeHPjQaiHdKWrV0vhGs6qQmpYbwcssd E8GfTlwjmytE8+mgKgiAbxc8uOUDKowD6lbt7jBtxFOTm30nn8VT+9mvWWeKdGJ6hV2/ z0NbQOvWY8H/etz8+xSrEhmqdBhzTL8CZqftMTMpielYegSMCKCw1fzBEKDGODEfEQcf HmGek3GjnTiRZQJHqMPWL6aBy5vb0tmX+xXzOH2zNmVt1Lna5U23cdrXWox9t6OzGvi0 hFWg== 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:content-transfer-encoding :in-reply-to; bh=F1dJN61v4a5HavamkHN7ACFSKiKkM/zUmpKZlIwuGio=; b=gcjDnB3U5Sb3zgFN14DuUR8ryFTB1knSy76Fs2md/40FvIDOBXYk+fjL5ddTAP971u QTRLBOgoqUAsKdSXbiyX8sC4S+bjqSe3L3Vu+oKP0M/H01FCbz0sCLZuP1XEFSqcTm2a aMonGlim6T0MiPbUXfXNe3ypHcPVHwipDoQ8tXOyUs77U03c3ddFmW4d5nLkHqrMWD79 BFprYTSX2Z9RMk1oo4/TXlH9RXX1lHWnIesL/immG3/Q+KOtcC2ToCjfTx4nwCf8EJFo 5wUZgn7sjATPlly4ZXyuYJj8GvMAYNU0J/jyRA7c7hgjmPSlfl24XJH+uWDkkf2FNrBn tmSg== X-Gm-Message-State: AOAM530acqXRIWzfjGGqG2e97Y+r6iw9OJu+/NmnZPPCUUKscvBjOjzP dZBElXP5lEWPA+4YXxLz/Q== X-Google-Smtp-Source: ABdhPJxPfI06sAVkGTy6viKv9UCBKipVm8L7Phjt+5w05y5+F9R58r0HFB7zZMJz+R9x59xlOaqZCw== X-Received: by 2002:ad4:4a21:: with SMTP id n1mr6387082qvz.22.1631812517789; Thu, 16 Sep 2021 10:15:17 -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 i14sm2632326qka.66.2021.09.16.10.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 10:15:16 -0700 (PDT) Date: Thu, 16 Sep 2021 13:15:14 -0400 From: Kent Overstreet To: Chris Mason Cc: James Bottomley , Theodore Ts'o , Johannes Weiner , Matthew Wilcox , Linus Torvalds , "linux-mm@kvack.org" , linux-fsdevel , "linux-kernel@vger.kernel.org" , Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , David Howells , "ksummit@lists.linux.dev" Subject: Re: [MAINTAINER SUMMIT] Folios as a potential Kernel/Maintainers Summit topic? Message-ID: References: <17242A0C-3613-41BB-84E4-2617A182216E@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9479150000B3 X-Stat-Signature: iaf9tzdwo4mi9jprbdinrx7u9mps9ueo Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HdcVwodH; spf=pass (imf04.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.43 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1631812518-372771 Content-Transfer-Encoding: quoted-printable 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 Thu, Sep 16, 2021 at 04:46:25PM +0000, Chris Mason wrote: > It feels like these patches are moving forward, but with a pretty heavy > emotional cost for the people involved. I'll definitely agree this has= been > our process for a long time, but I'm struggling to understand why we'd = call it > working. >=20 > In general, we've all come to terms with huge changes being a slog thro= ugh > consensus building, design compromise, the actual technical work, and t= he > rebase/test/fix iteration cycle. It's stressful, both because of techn= ical > difficulty and because the whole process is filled with uncertainty. >=20 > With folios, we don't have general consensus on: >=20 > * Which problems are being solved? Kent's writeup makes it pretty clea= r > filesystems and memory management developers have diverging opinions on= this. > Our process in general is to put this into patch 0. It mostly works, b= ut > there's an intermediate step between patch 0 and the full lwn article t= hat > would be really nice to have. >=20 > * Who is responsible for accepting the design, and which acks must be o= btained > before it goes upstream? Our process here is pretty similar to waiting= for > answers to messages in bottles. We consistently leave it implicit and = poorly > defined. >=20 > * What work is left before it can go upstream? Our process could be > effectively modeled by postit notes on one person's monitor, which they= may or > may not share with the group. Also, since we don't have agreement on w= hich > acks are required, there's no way to have any certainty about what work= is > left. It leaves authors feeling derailed when discussion shifts and re= viewers > feeling frustrated and ignored. >=20 > * How do we divide up the long term future direction into individual st= eps > that we can merge? This also goes back to consensus on the design. We= can't > decide which parts are going to get layered in future merge windows unt= il we > know if we're building a car or a banana stand. >=20 > * What tests will we use to validate it all? Work this spread out is t= oo big > for one developer to test alone. We need ways for people sign up and a= gree on > which tests/benchmarks provide meaningful results. >=20 > The end result of all of this is that missing a merge window isn't just= about > a time delay. You add N months of total uncertainty, where every new e= mail > could result in having to start over from scratch. Willy's > do-whatever-the-fuck-you-want-I'm-going-on-vacation email is probably t= he > least surprising part of the whole thread. >=20 > Internally, we tend to use a simple shared document to nail all of this= down. > A two page google doc for folios could probably have avoided a lot of p= ain > here, especially if we=E2=80=99re able to agree on stakeholders. >=20 > -chris Agreed on all points. We don't have a culture of talking about design cha= nges before doing them, and maybe we should - the Rust RFC process is another alternate model. That isn't always a bad thing: I have often found that my best improvemen= ts to my own code have come from doing a lot of exploratory refactoring, keepin= g what works and discarding what doesn't, trusting my intuiting and then then lo= oking afterwards at what got better, and asking myself what that tells me about= what the design wants to be. In hindsight I feel like Willy must have been doing the same thing; I thi= nk the folio work is opening up _really_ interesting new avenues to explore - I = was one of the people talking about compound pages in the page cache early on, ye= t I did not and would not have guessed where the work was actually going to lead,= and I find myself _really_ liking it. But more than the question of whether we write design docs up front, I fr= ankly think we have a _broken_ culture with respect to supporting and enabling = cross subsystem refactorings and improvements. Instead of collectively coming u= p with ideas for improvements, a lot of the discussions I see end up feeling lik= e turf wars and bikeshedding where everyone has their pet idea they want the thi= ng to be and no one is taking a step back and saying "look at this mess we crea= ted, how are we going to simplify and clean it up." And we have created some unholy messes, especially in MM land. I've been = digging into the rmap code and trying to figure out what the _inherent, fundament= al_ differences between file and anonymous pages are - I think folios should = also include anonymous pages, but not yet - and I keep finding stuff that's ju= st gross. Endless if (old thing) if (new thing) where literally no effort ha= s ever been made to figure out if these things maybe should be the same thing. It's like - seriously people, it's ok to create messes when we're doing n= ew things and figuring them out for the first time, but we have to go back a= nd clean up our messes or we end up with an unmaintainable Cthulian horror n= o one can untangle, and a lot of the MM code is just about that point. And if you look at our culture for how these kinds of deep invasive new f= eatures gets developed and reviewed and added, is it really any surprise? We bike= shed things to death, which scares people off and means they make the minimal = changes they need to core code - which means not touching the existing paths any = more than necessary, and people don't want to come back when they're done. Our process is not encouraging good work! And when Willy comes along with folios - which by introducing a new data = type for our main subtype of pages, are a starting point to taming this insani= ty - he gets hit with the most ridiculous objections, like whether folios are a replacement for compound pages (answer: no, compound pages belong to the = other side of the allocator/allocatee divide). It's like no one has ever heard = of separation of concerns. To everyone involved: if you want to do competent design work you have to= be able to separate yourself from the specific problems you've been staring = at and look at the wider picture, and ask yourself if this thing you want is a g= ood idea for the wider ecosystem, or whether your specific problem _matters_ = in this instance. MM people: I know you care about fragmentation, and that a lot of your wo= rk days is spent dealing with it. But it's not a concern for folios, because we c= an always _fail the allocation and allocate a smaller one_. And I have speci= fically pushed back when filesystem people wanted fixed size folios because they = thought it would make their lives easier: to restate my answer to that publically= , folios are basically extents, and part of being a filesystem developer an= d dealing with extents is that you have to get used to dealing with arbitra= ry sized extents - i.e. processing them incrementally, you have to be more f= lexible in your thinking then when you were writing code that was working with fi= xed size blocks or pages. But you'll deal. /end rant I apologize in advance if anyone feels I've been unfair to them; we are a= ll, after all, figuring this out as we go along. But we've got room for impro= vement!