Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp543124pxv; Thu, 15 Jul 2021 09:53:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvzq12MXS0AXNX68IY/sS56XqLM8K/tFrNdDcVfsEDqrhzry5mTmGn9e0Jo+NgZaedx8yy X-Received: by 2002:aa7:dc02:: with SMTP id b2mr8302497edu.46.1626367988729; Thu, 15 Jul 2021 09:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626367988; cv=none; d=google.com; s=arc-20160816; b=SjwqcFdmnhGpqRpuwWrDW4AxbJ3P/VHZW2/s67xOVsSC6ugth9TaOpu4yzWRM+SgTW kxb1hg1j8CMi+kF5WRRiHAeu4WBLIapPSqyQ6UtPFWz0uBdBbNl9SMjJIkITjuloxKhx AnmdwQI3tBTCvn948iYfPgsgQx6E5CVwJEjPcNZM7UUtLIcj5pORXHjlplFGSG9sC5wJ cvRpySIAvjmqKxfI+noiZ9y7BOioW8O5Ei/V4yTMaL5X5b4OHEdoMZBjdCbPVMjKWMnb fxAFUHSqsA8THn41xJTnv0A2pxyIa3Pt6hSiFIgDjtntHvULwYyBkNilnSL7yudsuvSh h8lA== 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; bh=3yenXjKJjq5p5JPUOhN2lLF8LRlOV0NV7nZsZ3FpVYs=; b=SDv4lzbxak6XWMwBshs5m1uDm9teKE7G63EcWJztVFCajA4zkvP1ACFviIho3JhW7G klWQV3Yj2VLjPQ5FtgOwC5Znd/uExC+B1RZrE16du/yGRzZ46HOWCG6bMu6imFfLc7Yd Rtcqy59AowNgUsfteZ/uqcJpJMntNMrgCuyUU1Gqahx1eK1LoSl/IqaBnqKNSPSJUh71 SFE2BOsAKLPsOhr3BE56C+9AxsziO0MN9UucIEpmL0wexNipVCpqa/RMQne/sffjr9gp LUMoPoeRz0M1V49nMGlnXOWgUPSn7oc1ms+5xzvXAnA1jzVX34qaSkD9eGxiipqSQf8x xRWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r14si8235557edw.524.2021.07.15.09.52.46; Thu, 15 Jul 2021 09:53:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239558AbhGOP7S (ORCPT + 99 others); Thu, 15 Jul 2021 11:59:18 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:42513 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239546AbhGOP7R (ORCPT ); Thu, 15 Jul 2021 11:59:17 -0400 Received: from callcc.thunk.org (96-65-121-81-static.hfc.comcastbusiness.net [96.65.121.81]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16FFu7nG013646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jul 2021 11:56:08 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 2D4984202F5; Thu, 15 Jul 2021 11:56:07 -0400 (EDT) Date: Thu, 15 Jul 2021 11:56:07 -0400 From: "Theodore Y. Ts'o" To: "Matthew Wilcox (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v14 000/138] Memory folios Message-ID: References: <20210715033704.692967-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715033704.692967-1-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 04:34:46AM +0100, Matthew Wilcox (Oracle) wrote: > Managing memory in 4KiB pages is a serious overhead. Many benchmarks > benefit from a larger "page size". As an example, an earlier iteration > of this idea which used compound pages (and wasn't particularly tuned) > got a 7% performance boost when compiling the kernel. > > Using compound pages or THPs exposes a weakness of our type system. > Functions are often unprepared for compound pages to be passed to them, > and may only act on PAGE_SIZE chunks. Even functions which are aware of > compound pages may expect a head page, and do the wrong thing if passed > a tail page. > > We also waste a lot of instructions ensuring that we're not looking at > a tail page. Almost every call to PageFoo() contains one or more hidden > calls to compound_head(). This also happens for get_page(), put_page() > and many more functions. > > This patch series uses a new type, the struct folio, to manage memory. > It converts enough of the page cache, iomap and XFS to use folios instead > of pages, and then adds support for multi-page folios. It passes xfstests > (running on XFS) with no regressions compared to v5.14-rc1. Hey Willy, I must confess I've lost the thread of the plot in terms of how you hope to get the Memory folio work merged upstream. There are some partial patch sets that just have the mm core, and then there were some larger patchsets include some in the past which as I recall, would touch ext4 (but which isn't in this set). I was wondering if you could perhaps post a roadmap for how this patch set might be broken up, and which subsections you were hoping to target for the upcoming merge window versus the following merge windows. Also I assume that for file systems that aren't converted to use Folios, there won't be any performance regressions --- is that correct? Or is that something we need to watch for? Put another way, if we don't land all of the memory folio patches before the end of the calendar year, and we cut an LTS release with some file systems converted and some file systems not yet converted, are there any potential problems in that eventuality? Thanks! - Ted