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=-7.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,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 58EC4C433DB for ; Sat, 20 Mar 2021 02:09:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CA71861978 for ; Sat, 20 Mar 2021 02:09:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA71861978 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5AA7A8D0003; Fri, 19 Mar 2021 22:09:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 545B28D0002; Fri, 19 Mar 2021 22:09:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F9F98D0003; Fri, 19 Mar 2021 22:09:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 246158D0002 for ; Fri, 19 Mar 2021 22:09:27 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CDBC78249980 for ; Sat, 20 Mar 2021 02:09:26 +0000 (UTC) X-FDA: 77938620732.23.962B5C8 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf13.hostedemail.com (Postfix) with ESMTP id 6636FE0001B4 for ; Sat, 20 Mar 2021 02:09:26 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id ha17so5528619pjb.2 for ; Fri, 19 Mar 2021 19:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t+Sd5TkDkbYjDcW9c09ppjohkzoeSBsR3J/XEf8zomc=; b=V3n6jkfcvEkoHpTVHHc2tsWXuinWGyHZTGyhBSxnADEwW7fdQ0GnRCSIzxDcrMUqE1 MXBuRsJoNO9SIrYDBalKJpfL1w1cW7Lm23UPOWHdh/bYVgVJIqQdjmrygX1hbPZAdeOd k03u64ZAh8tJ10tFn1Oi24srF1M3jrBPtXDm7eN3l5n1eKtYR1awFWPnql15fwOwDK9H qQnqiqR0aLkoOyJW2xydHWpYHfmqIdPPq3ypQUPEd3PJlj+L3YoS9aeyDOVRXYYzPD+/ NFIumgHxSHpa+vgRyvYqBx4DM0CNSdjKY/AQtmYIGdMhObqXDFVIfSYuPKzeh8aI02r6 lv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t+Sd5TkDkbYjDcW9c09ppjohkzoeSBsR3J/XEf8zomc=; b=gYOKKWFe3HqrkWc2w0zhPeKGcAOJxt96hlSDHY/pR9RgB+ysEmTdAtxDUYj2fcPjeW NTXaVWw7ddTmpj03vepF8JhYuEOSxOYor6jYfRmpV8g1eMuOI4VdEGp9067kXI1mYxYy ucZ3HSx9OabQgczxWwSC7tePUPRsJQnzoQ6dEAvspuxh3g226P5xQxvXdbFpSUtlH4y3 K2efwblpzW3oHs7LRmDFxrLjg/98Htl23n/sP4JmbXfycAp824AA0WK+IEVnhYh7StGi Ihe58O5jmQHcfFxBFukkIL1r7dbXABF5h3vQtUUHvbDEny9zd1QW3cbIqRU+Mz4MNGUT TnCA== X-Gm-Message-State: AOAM533BYNmrQJxG4DoF8yoIoFfZB/AP4KdbfRgACHu9ul2VMbgASbQX 31RHuKk7pw5IFSIHtCAe6k0ZkuQraa6LfGUG X-Google-Smtp-Source: ABdhPJx5mqZ3b2Tdd/JDeRtXn/WwG7dih3Ww8eM9H065TK7jFCpTnOg+ljp0WgS1SfQ142iuVpX4ZA== X-Received: by 2002:a17:90a:bf15:: with SMTP id c21mr1417714pjs.160.1616206165399; Fri, 19 Mar 2021 19:09:25 -0700 (PDT) Received: from localhost (121-45-173-48.tpgi.com.au. [121.45.173.48]) by smtp.gmail.com with ESMTPSA id v13sm6018780pfu.54.2021.03.19.19.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 19:09:23 -0700 (PDT) Date: Sat, 20 Mar 2021 13:09:20 +1100 From: Balbir Singh To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 01/25] mm: Introduce struct folio Message-ID: <20210320020920.GD77072@balbir-desktop> References: <20210305041901.2396498-1-willy@infradead.org> <20210305041901.2396498-2-willy@infradead.org> <20210318235645.GB3346@balbir-desktop> <20210319012527.GX3420@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319012527.GX3420@casper.infradead.org> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 6636FE0001B4 X-Stat-Signature: wwpeixxziq3p634pthuwd386tji6osk5 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=mail-pj1-f48.google.com; client-ip=209.85.216.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616206166-397506 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 Fri, Mar 19, 2021 at 01:25:27AM +0000, Matthew Wilcox wrote: > On Fri, Mar 19, 2021 at 10:56:45AM +1100, Balbir Singh wrote: > > On Fri, Mar 05, 2021 at 04:18:37AM +0000, Matthew Wilcox (Oracle) wrote: > > > A struct folio refers to an entire (possibly compound) page. A function > > > which takes a struct folio argument declares that it will operate on the > > > entire compound page, not just PAGE_SIZE bytes. In return, the caller > > > guarantees that the pointer it is passing does not point to a tail page. > > > > > > > Is this a part of a larger use case or general cleanup/refactor where > > the split between page and folio simplify programming? > > The goal here is to manage memory in larger chunks. Pages are now too > small for just about every workload. Even compiling the kernel sees a 7% > performance improvement just by doing readahead using relatively small > THPs (16k-256k). You can see that work here: > https://git.infradead.org/users/willy/pagecache.git/shortlog/refs/heads/master > > I think Kirill, Hugh and others have done a fantastic job stretching > the page struct to work in shmem, but we really need a different type > to avoid people writing code that _looks_ right but is actually buggy. > So I'm starting again, this time with the folio metaphor. Thanks, makes sense, I'll take a look. Balbir Singh.