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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 61B5AC433EF for ; Sat, 18 Sep 2021 04:51:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 016D86008E for ; Sat, 18 Sep 2021 04:51:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 016D86008E 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 8D18D6B0071; Sat, 18 Sep 2021 00:51:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 859446B0072; Sat, 18 Sep 2021 00:51:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F9E7900002; Sat, 18 Sep 2021 00:51:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id 5C2B46B0071 for ; Sat, 18 Sep 2021 00:51:54 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1690F2D002 for ; Sat, 18 Sep 2021 04:51:54 +0000 (UTC) X-FDA: 78599471748.09.AABA81B Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by imf24.hostedemail.com (Postfix) with ESMTP id C7152B000099 for ; Sat, 18 Sep 2021 04:51:53 +0000 (UTC) Received: by mail-qv1-f49.google.com with SMTP id gs10so7739926qvb.13 for ; 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=MVbPFR3Jebr8drmlEhLjSCYlvxGr6IxXxDC0wFLhCHw8g39vWiBJX1Y/m3SWuIb64M nYhLExASg26kQPo2Nk47e+iPKZlt7wlCWy/5va0yzPb5MOPrSUqOMyCWLMITrwElnCC7 yLkNv16A3tR2gvrfAtIUwiawTkyM2LbggBQHhBNcaR53tYKvR4DtfLaqBrzV4koeVD0I eb154Ef7QwILHrTTcDchxFd2JDmAlEXy3wg33YS83TipsBFc8FFAy8bvF/1xEYMdHVwS iIy0sHnB/2b97p7fvIbv7Q/oXzQPrJ8gZ6IaBnqIDAwqHpwGipjYEKxe8CkcWAKIkLnH dhrQ== X-Gm-Message-State: AOAM5306HhcLREHQBEBKGKBuby9Av18kfamEOarFBiZipji7m0RNcG1n yxCAvRTTviX5AuUDO6Djtw== X-Google-Smtp-Source: ABdhPJx14NpxICY0C7PwvNnMhv+HtvMLK120FWdUGyxYOjBXD/sLmEJIKIgvSKZa5Byyy0f1X5lw4g== 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> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C7152B000099 X-Stat-Signature: x657w9mygnngoqr7dbtojkx6dpff9feq Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qO51PU+K; spf=pass (imf24.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.49 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1631940713-462984 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 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.