Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp367460pxb; Sat, 18 Sep 2021 05:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdbo50WhWnqI+WmqyAre3lnPu8Q77mMnN38gollqf1TnRcvCWkyQaQhOAy+BmDuaSiG3kr X-Received: by 2002:a05:6e02:2145:: with SMTP id d5mr11558958ilv.23.1631967330421; Sat, 18 Sep 2021 05:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631967330; cv=none; d=google.com; s=arc-20160816; b=Prog8DjivX+MbRev+dzWdmn4KW8/OlUgyRyXLBcRf6TCo4OOapRNpddl6TTgsU26Or PVmeVAVb6YMmr0Sqsfr7JPgxFUcDr6FGPzBdsAF4ZyTiYAj5RjjgLLVqBrb2cGfA4aQP Txbec7622hpO83BrqneueCK57vzoxNmoIHMmWADYXZp8Bb4L7ZRT6IiN/OK9/PjvRGiJ rghfgVtpSYC5RepxbcLS/Bb1iZWR+uozM5ZPay5jqkQZcrUlg8SW3hAlcWtvMXoCrklo JkfY6I2Jn5Y5ID6x2j2YVb6RelyUb3bfJogNWEQgQ43APM9MEbZM8Ko6asC+Y8ExF4/i QS1A== 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=xnlJK2QDxvN8iWcRjZHdIvPQ/AxJxZfwNJq8W7/WDx0=; b=SiCML7MVqxgepeDpagP77V7sGev7vVizcFzvwkyAqZPhJN6+L9d8JQOn/cTm2+4DnN cLaQesSiQkghxkY6KlHiNBN4s4RyJqc/CW54ihPHdqJ6/C9Wo9sHpgP2xh4TXldQCKFj 4SoO2AdxKLDmELex0+u33GXlWXna/H8rd7CEPUBtwYSpzxcFbAEJMoYj3iwg5ymz0/tk VzrMtVQcXEzezvj3b0Y9Uo9LYC024EqYSdAFXIJdh06spqjcx9ENI4YzVHCkthqPioms 7VmxrDANwp07XReRe9yep9szU1DoLwSIEP6HpEKGSLcipmc6xH1psGDlP7bPfZYR5Qqp obIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qO51PU+K; 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 t6si8105687ilj.70.2021.09.18.05.15.19; Sat, 18 Sep 2021 05:15: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=@gmail.com header.s=20210112 header.b=qO51PU+K; 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 S238851AbhIRExU (ORCPT + 99 others); Sat, 18 Sep 2021 00:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237401AbhIRExS (ORCPT ); Sat, 18 Sep 2021 00:53:18 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085D6C0613C1; Fri, 17 Sep 2021 21:51:54 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id g11so7789798qvd.2; Fri, 17 Sep 2021 21:51:53 -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=xnlJK2QDxvN8iWcRjZHdIvPQ/AxJxZfwNJq8W7/WDx0=; b=qO51PU+KTWRMVs02aFCQLj0BxjhJ30qJ/LQP1kVVFzP5x/xvKyKRo0A90P288aHv5x ATY1ru8pgVRbC0edCG91cYjKvXJBVMbnhEgOUFGW8ubGN3FGjQlFh9oReJe8w8Wu1EWU +nmDLVH2VvTi/MKNXOqaTciuwYvoIV3igYOAsopJ4sgLvpwlDk5S8EDNCdY+uAvcgu2u +OuurEGEs0KepoTzwf1KyuXc99Q3tkvyFJhFJ31IK+V4gs3bK6mCipNCZLTyA4pEnbcd hZEhxTZabllMY7OdhS8tn29oLGV+Sckqt4K1EynF4PMN7Bv1uLENU+maOMgmRwA6iNjv QXNA== 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=xnlJK2QDxvN8iWcRjZHdIvPQ/AxJxZfwNJq8W7/WDx0=; b=x5K2JpxmVcJ3v1BXmSGdTaoPHTLLmlOe9teHUVJEa8Hx5K05FNJgCuqjQ9KIoIXHI/ DpuP0eFP/jYN75ngAMfBdoGDJacNKdWt86eu5PDvedGPJpeSwynhDXmk6rs0kzc5Ir+3 ZqpS/uWz/d5epPcysM1gFqGNnUVTPNWXBA00YxdV/CoWwT+UU1gOeHiOI1fNGP/lAxqX B+5B57p3OptAESwGN/qlR0iY2OUZrW6d+WAztpwEe+IBCSwS1V/pKabPMGhcOm0IfBD0 OylL+cfdCtO3WRo9TGqhLJ/E96RpNEbseYQAk8BJ/QL8I2OtDH7NFiTLSF+m/lkUFCdG BcJA== X-Gm-Message-State: AOAM532fRoYtFAh/SSjTH7ViVWNCcidHjjT8GZg1jYIAoYJGIIaRoKYE y2VToI3QJXAICwMmoHDjiQ== X-Received: by 2002:a05:6214:529:: with SMTP id x9mr14616598qvw.17.1631940713177; Fri, 17 Sep 2021 21:51:53 -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 w20sm6526364qkj.116.2021.09.17.21.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 21:51:52 -0700 (PDT) Date: Sat, 18 Sep 2021 00:51:50 -0400 From: Kent Overstreet To: Dave Chinner Cc: Johannes Weiner , "Darrick J. Wong" , Matthew Wilcox , Linus Torvalds , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , Christoph Hellwig , David Howells Subject: Re: Folio discussion recap Message-ID: References: <20210916025854.GE34899@magnolia> <20210917052440.GJ1756565@dread.disaster.area> <20210918010440.GK1756565@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210918010440.GK1756565@dread.disaster.area> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 18, 2021 at 11:04:40AM +1000, Dave Chinner wrote: > As for long term, everything in the page cache API needs to > transition to byte offsets and byte counts instead of units of > PAGE_SIZE and page->index. That's a more complex transition, but > AFAIA that's part of the future work Willy is intended to do with > folios and the folio API. Once we get away from accounting and > tracking everything as units of struct page, all the public facing > APIs that use those units can go away. Probably 95% of the places we use page->index and page->mapping aren't necessary because we've already got that information from the context we're in and removing them would be a useful cleanup - if we've already got that from context (e.g. we're looking up the page in the page cache, via i_pageS) eliminating the page->index or page->mapping use means we're getting rid of a data dependency so it's good for performance - but more importantly, those (much fewer) places in the code where we actually _do_ need page->index and page->mapping are really important places to be able to find because they're interesting boundaries between different components in the VM.