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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B604C00140 for ; Fri, 12 Aug 2022 14:39:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A13558E0001; Fri, 12 Aug 2022 10:39:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C3026B0075; Fri, 12 Aug 2022 10:39:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B1998E0001; Fri, 12 Aug 2022 10:39:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7C06A6B0073 for ; Fri, 12 Aug 2022 10:39:15 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 03B2B8099F for ; Fri, 12 Aug 2022 14:39:14 +0000 (UTC) X-FDA: 79791198270.24.8A840CA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP id 647051C007F for ; Fri, 12 Aug 2022 14:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Nl22ri9kHmMuIubWl/UE+mk2gjOsQI14vnHU03BPY2c=; b=DNAeDjtEj3AHpgo4A35DscYxuA whf9njf+SpKaEK7vGO5sx+p9ais31qhu5+OODJJKgNbrjKh3N4yFC1QEse0T5OPXFNA8sWzRzWL/g frfrWN/Y13ElYhhSbdbaADnIxg2Q5vhahHpHYbjKZwColXx4DEhObfIsBFH89RwgxZRRIouDAHuFg sKEKtJ+cMF4JriKoj8J700K8cn15jJSxWYeytFXu8eQJfeHzzmNhF5SG1RSADUudu1i7solC3vGPM t9tgKL7kpCfa9L+7PDnv7n0dciKZdun3GnzQehWxtY4lgRhe7HVnAYRKFDRzFlth6qYDbrH7C7thf Qd5gyLRg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMVob-002Fh9-BR; Fri, 12 Aug 2022 14:39:09 +0000 Date: Fri, 12 Aug 2022 15:39:09 +0100 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: State of the Page (August 2022) Message-ID: References: <20220812101639.ijonnx7zeus7h2hn@box.shutemov.name> <20220812143356.4kv5cycwbcy2t7ul@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220812143356.4kv5cycwbcy2t7ul@box.shutemov.name> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660315152; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Nl22ri9kHmMuIubWl/UE+mk2gjOsQI14vnHU03BPY2c=; b=qhMB9sy9oTPo3kWK6Lve+Zo1jkgceqBsmCF+GdHPXOA8d9MUESafW5X+kCiSRBJ4XWKfr5 o9QnNmSeAC0d2qGpYbLlvYu4D4Z11rvgnr18R7OsFgTNDaHq1tRfwm/ceblbW8j7vrLdwz EGRoLOctaIxloaT5BsrWZ5+aowCZeWg= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DNAeDjtE; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660315152; a=rsa-sha256; cv=none; b=ZYrRHMPWRHE/9Z3pq3sK4BNZFbHXCfiOB8N5fOdOwwP4LHS0JbdFVqdT8kZ2i0cggqZwUo +jsImkaL4MuFrxb17H6/tfRyPeqX8dKaZHtPcQCBjuw7wgVzoGwMEH7IavxaSdcKY2sCMf a0HBNWLcbtuCJxetRI2CVWaFt0PcFu8= X-Stat-Signature: h4na1fdpesufe64bg6d84bqx36cpjanj X-Rspamd-Queue-Id: 647051C007F Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DNAeDjtE; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1660315151-939966 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, Aug 12, 2022 at 05:33:56PM +0300, Kirill A. Shutemov wrote: > If you really need info about these pages and reference their memdesc it > is likely be 9 cache lines that scattered across memory instead of 8 cache > lines next to each other in the same page. Well, hopefully not. Most allocations should be multiple pages. That's already true for slab, netpool and file (for xfs anyway), and hopefully soon for anon. > Initially, I thought we can offset the cost by caching memdescs instead of > struct page/folio. Like page cache store memdesc, but it would require > memdesc_to_pfn() which is not possible, unless we want to store pfn > explicitly in memdesc. I think we do, at least for some memdescs. File folios definitely want to store the pfn, but I don't think getting the PFN for a slab is a common operation (although we'll still need to store the pointer to the struct page, so it's equivalent). > I don't want to be buzzkill, I like the idea a lot, but abstractions are > often costly. Getting it upstream without noticeable performance > regressions going to be a challenge. I don't think there's a way to find out whether it'll be a performance win without actually doing it. Fortunately, the steps to get to this point are mostly good cleanups anyway.