Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4443734pxv; Tue, 20 Jul 2021 04:03:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0RJUlsOovevTDfqw+mPHq2SK+/v+Prnnz5Uzifxo8GeShKToWz4q86pD88i2C/Vz8xRPO X-Received: by 2002:a05:6402:3489:: with SMTP id v9mr25295630edc.124.1626778987970; Tue, 20 Jul 2021 04:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626778987; cv=none; d=google.com; s=arc-20160816; b=XxsX3LpihM5I4wlUpLTg2fHBQ0r3VbXJ3wXr/AeXdw9N4JQ2b4KW3Y6/eEealGOv/r L5hk385pClHVdZQFk8DMlYmhwC5fqv6fQTXaAo/msnWUqlHo4P2GzfrTr7UMZQ3z1HQE tDE7MgH8jBZnSxyXb/KouPTRsBj2e3EuZMqA7hl73jZ/T2W7FRECiMRYscvT7k9QdW7b sSjurToBeVOL9kqlwC9gi8VyvzewL5/aWxkatpbYeGjbvu3wdwa4QS+1coITksBiqaXB 6lZ5j55KafXCCd6zLD5p6qajs3JXGS214bea6WlDnxYlRfTNbMZZ7Dn/GvMEeTO9f9tG cljw== 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=41mIRTo58eTmqnCHLE0/2jDXnWyWFGaCxytJopgbrek=; b=l911j3kdMSAuU/bnyK13Tb0tT2EBKvaTP8pBuSRMFA+mPDE7AkecesjQeFm3QZ2Q7g vpWQyaXtWyskXNcqh2ak5BV2u0iPLnc4lzp8/grtC2j2aPaxCMGSWkpLsBzXmdLf+dLi rJoRS3lem9i8J9UWnLbWfOLD5ZYIgMmQtg9ykryOpQRVx6TTgztA2AZhooxpTkaHj4x7 MLF6oMNU6BBwJ2yJ03jrIkrASKmaN1wVInIoEbu0UCfcRPh9XW842V3mZFyF+6ko2RRC lbVkVbcxjn5tdVPthZgyknr5bzFD9rruYQWFXcFYWOs0qE28bdm0UQSTM/sQWoVKb+Mj Bcmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oWbtO1C6; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si22977484edt.262.2021.07.20.04.02.44; Tue, 20 Jul 2021 04:03:07 -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=@kernel.org header.s=k20201202 header.b=oWbtO1C6; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237366AbhGTKUg (ORCPT + 99 others); Tue, 20 Jul 2021 06:20:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:37842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237649AbhGTKOG (ORCPT ); Tue, 20 Jul 2021 06:14:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E9884600D4; Tue, 20 Jul 2021 10:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626778484; bh=Ja1be3usDDuv2HFqu3UdV/HBuywqhaiWMGjarNGVSxk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oWbtO1C6ssjAl8A8/TUy/4MJ+D1+YoxtieXKimAg3Y0aNz/BxIr4OL51uig3Z0R38 9N/y6VfgbnrSv6m37Yv8NVUcPWiXZxSlp44ndQrVI7oyLILn/zFwfE/Jh590iVcvSg veQZQULOIw0j84/xUVkXbaycXmF5XblA24XmXwZWKkkXnhO0NGLwwkJrqX+NTWYUcb OE8yBrczsTk2CZ1ehs19FGfP2q00tq+aJVZDOqZZST0zXqof/50gufNvlZs42UJrYd mXbCZjpVe14qY5Gjxom3PFf9gtJooP0Ree5Ttn2+bVhnh4Nn3Iwjr8+IFRURUPDY16 cgJg0PboswF7w== Date: Tue, 20 Jul 2021 13:54:38 +0300 From: Mike Rapoport 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 Hi Matthew, (Sorry for the late response, I could not find time earlier) 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. I like the idea of folio and that first patches I've reviewed look good. Most of the changelogs (at least at the first patches) mention reduction of the kernel size for your configuration on x86. I wonder, what happens if you build the kernel with "non-distro" configuration, e.g. defconfig or tiny.config? Also, what is the difference on !x86 builds? > Git: https://git.infradead.org/users/willy/pagecache.git/shortlog/refs/tags/folio_14 -- Sincerely yours, Mike.