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 AED42C6FA99 for ; Tue, 21 Feb 2023 19:58:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0048D6B0073; Tue, 21 Feb 2023 14:58:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA9306B0075; Tue, 21 Feb 2023 14:58:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D49996B007B; Tue, 21 Feb 2023 14:58:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BB5156B0073 for ; Tue, 21 Feb 2023 14:58:40 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 85BC51608F2 for ; Tue, 21 Feb 2023 19:58:40 +0000 (UTC) X-FDA: 80492361600.01.C17A863 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 97913C0009 for ; Tue, 21 Feb 2023 19:58:38 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=IHbWhPII; spf=none (imf10.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677009518; 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=3m7BCGAEZNjDasZrz2wufh7wDwBRXOZCBbm7SGl9TRc=; b=iTnQk56HcmfA2Bc9r3Il/3afy+Olwl4uatNZ6o+8SjIPAMgi/c1t9uagrA+FBItNvBseVf kvbctKyXnoS96ow+wOXTviX3YMCNUnS4Us4mXotiVOCE4N6/4Ckg/U2mARmBUa57g+RyoW INq/3L8U7QooTSDruVoaVgyVGZxWzf0= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=IHbWhPII; spf=none (imf10.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=1677009518; a=rsa-sha256; cv=none; b=yxRXyCkoBIMLto0EgCzuYeEf/drUjHU7H2bkTR1Y7iyf0QiZ7KydsIPg8fr5t7cerYaIss LMM7JmweZrrPhZRSXd2LsLfJcxUcrC9HOnucj8Rjn9e7rTDMms62NYUAOOjo0iHtTy/kII x1JyNHt3jDPMQBc7rBGx1xTjMvZZnVg= 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=3m7BCGAEZNjDasZrz2wufh7wDwBRXOZCBbm7SGl9TRc=; b=IHbWhPII7qYnTuhitFCv7e8Ptx +DDIa91/rALCRuXZ3Y67WQ3Sf7pMxTt3xXHQ+0yy4i3B8bbi6qqT+JWr+3wQ2C7OMw5IZOMeyvMvE hGMoCoqSMp+aoBcnhOLm3FdWMwC6OrUvR8P65lm/ufn8IvmmsJJN5hhc50tBCz888s5FvEOxZCdek yE6Oma0hpMqRqM+rGYSIZ/cbZhyIiW7KmnMr5/mfRsBNUFmPxn/593lUZDWT0+Dj+NjtO0jm2SaUD Ch1AGOvX1J2BRTlv26sDVzx8QV5VcCkfwO9yvzMKgfeuV66IT1iHF+0/Rx6/Vju4FziwY/8lcwkyF lgzryj5g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUYmR-00CsKI-Cd; Tue, 21 Feb 2023 19:58:27 +0000 Date: Tue, 21 Feb 2023 19:58:27 +0000 From: Matthew Wilcox To: Gao Xiang Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, bpf@vger.kernel.org Subject: Re: [LSF/MM/BPF TOPIC] State Of The Page Message-ID: References: <8448beac-a119-330d-a2af-fc3531bdb930@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8448beac-a119-330d-a2af-fc3531bdb930@linux.alibaba.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 97913C0009 X-Rspam-User: X-Stat-Signature: engopi8bn58fr51n5ju9q7zd6p1nmnw9 X-HE-Tag: 1677009518-930101 X-HE-Meta: U2FsdGVkX1+3gW9tD0NAIR+kWXMWq2EMq5QC6ikaQU4VB1zQ31vE4WfY5yY4zcjbWspVmmmRNSgMx3kA6YGADpk0u2/qTK0pcYSk7Fd3gLHgPwmFIicCSjOcLPhwhHwac+DzaVy+ITryXpdm61B3eI45RI5kCPiItvpXy8nciwG62MH65yzu5/yq/LarHON4CxKhKWjSoBEvJMZ1XPYbJPCkkNmYbhyxgqTjeLD4DMbt6VSYULN0QRXGBdhVcMoRC29BejktafAQE4xCf4AStaOfN57LUdPyYIkkm5BhNmO0p4JE1MR+ahHgQhjVTA9Brzg/SzsOrDdx//38wBwyuuEzoVeeEjEPTPJkVQvSnZ0wpiFOQa7Mvj6v1kc7wPAZpn4MF02pY6aS9F5lXbmvgLA2+6GXsvvqHx0miotTcjEbQqoW23aSZDF23OA3F75Gb8TNlLdZmdPO4Jaln+X+5YC5H1CWQo6Ftq6vcLW61WdpzjWtkGTiB93LAwxTG9xqq5VWHNZQrXq45niUhNH18UktAgcccNbKoiueFAdX34112gDc6ocf0MnyyrzYODkEGEJFfgJtVNLxZR/6jBTUP4WgyRPGYQOFdtCsFfWcFcgEOsoJRB/gQdsU89Lm/T/dpdi3SAnCV6F+Qmx3xLjIV7iMaK+zVl5Yh03QI6f2kKjPoi97wUhfmPTFSqKXKAhEbOnFKr4NAW1CQ4ZlkMTBhbHIXUyLphvRA2cqtnpNu9orBXOlg5TP6EqqE70xXs6rvS7GV5mvHMWhPyE+pZfeY9/r7FntDjz5aqzZ5MSyZzu4r1K29O+LFWiV3Z/ihu9ajbgsZniJDQFnkbFalEndeyC0vyleBL8zrt7DSZ/N7i8bC6XHbNv/AJqQSgXtHvjJcja3OLRk5j0PQcAl1ldXF32bNpSnvMAgB9InxiVPyY6nZ+qV7HbB8voCAmp6Mbxnh27BJgy9HXeyCmhMuFr Ob9O2Ao4 fEq6MMntuPlHCOAbk3vQIlz6H/csSne9VTzaEr6kP3eBCW5GRIwJtScG5Ys05QfS7XkL1fwnC3WoaR+jnHVA4s/xEQDH84pPmyHhaqB4e5snJEz5iNohxZlIbKQDEUkcl6hMH0ToB9uO8wJz0/SeirOU2+YuQ682GSnNrH/I2uE5z4Nyx5aFZWeYmAsSw4p9YFWCL4RH/p/Od0KWo0+IlaWtLOYthuyuoToqoyAbUwejbCfkAvk0/PZ1vG3ngBiJHzpvWS4j1vBkD/thOKdj2FJIaOpkzx999aUZKJ2JhrmTtsY8= 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 Wed, Feb 22, 2023 at 02:08:28AM +0800, Gao Xiang wrote: > On 2023/1/27 00:40, Matthew Wilcox wrote: > > I'd like to do another session on how the struct page dismemberment > > is going and what remains to be done. Given how widely struct page is > > used, I think there will be interest from more than just MM, so I'd > > suggest a plenary session. > > I'm interested in this topic too, also I'd like to get some idea of the > future of the page dismemberment timeline so that I can have time to keep > the pace with it since some embedded use cases like Android are > memory-sensitive all the time. As you all know, I'm absolutely amazing at project management & planning and can tell you to the day when a feature will be ready ;-) My goal for 2023 is to get to a point where we (a) have struct page reduced to: struct page { unsigned long flags; struct list_head lru; struct address_space *mapping; pgoff_t index; unsigned long private; atomic_t _mapcount; atomic_t _refcount; unsigned long memcg_data; #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS int _last_cpupid; #endif }; and (b) can build an allnoconfig kernel with: struct page { unsigned long flags; unsigned long padding[5]; atomic_t _mapcount; atomic_t _refcount; unsigned long padding2; #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS int _last_cpupid; #endif }; > Minor, it seems some apis still use ->lru field to chain bulk pages, > perhaps it needs some changes as well: > https://lore.kernel.org/r/20221222124412.rpnl2vojnx7izoow@techsingularity.net > https://lore.kernel.org/r/20230214190221.1156876-2-shy828301@gmail.com Yang Shi covered the actual (non-)use of the list version of the bulk allocator already, but perhaps more importantly, each page allocated by the bulk allocator is actually a separately tracked allocation. So the obvious translation of the bulk allocator from pages to folios is that it allocates N order-0 folios. That may not be the best approach for all the users of the bulk allocator, so we may end up doing something different. At any rate, use of page->lru isn't the problem here (yes, it's something that would need to change, but it's not a big conceptual problem).