From patchwork Mon Nov 4 21:05:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13862011 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 09FE1D1BDF2 for ; Mon, 4 Nov 2024 21:06:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 875DE6B00A3; Mon, 4 Nov 2024 16:06:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D6B66B00A4; Mon, 4 Nov 2024 16:06:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 62A3B6B00A5; Mon, 4 Nov 2024 16:06:15 -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 411836B00A3 for ; Mon, 4 Nov 2024 16:06:15 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id ED34FAC540 for ; Mon, 4 Nov 2024 21:06:14 +0000 (UTC) X-FDA: 82749643242.17.B6E9CA5 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id E126E1A0025 for ; Mon, 4 Nov 2024 21:05:32 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=cSOQ1Pu6; spf=none (imf19.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=1730754325; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=IPUXcSba4hpDc7ZFq/hxzhhDKtMBom8UcmG+num2BO0=; b=FmaQuewCv39oax8t+NxPTHmNCI04oM9cT9ElJ+cNgZqtYC72BM5UAXmTycNPO9jft0H7cn BAyYnqopjQwUQtomgVs85T8y7HBVSR/cjfVUJojWWO0qqIVSIfr0CP3Z7LemF8yrHfB3pi 8yI+SLlGBa01u8o+J9xk8MBs8/bnmf8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730754325; a=rsa-sha256; cv=none; b=Y9I6DVVJoCTTHRijN/mF0Xq9cHWQBy0QVn7KUwA6jU3cs4Ab5HcMX3Oq/znAkbxpq5NzMO UKjAr9GZwXwcpZY9Dq+EktsRsUUffq3R3lf5w5YYn0/HvN4D749PlcKlBaOYeX54yxtV0Y T8EybU/XYdR0zvANVFYGXC7svmaetbc= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=cSOQ1Pu6; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=IPUXcSba4hpDc7ZFq/hxzhhDKtMBom8UcmG+num2BO0=; b=cSOQ1Pu6GnAZ3ImVSgvtG+e6SU rnBmGbx5pNW88okR/IXYaHGOG6KOVF2wKO9yra3Csq37veyeGMJOyuYvkLAfFDzdaWUk+/ochSu4x MWCYL6RoMkQyigFTGxheL1GjuHOOQpHHZf4ORw5pH0kRnjMdnoWDM95TqHKuXX5Lb/KMxIJ8nwbr0 yJ3MyHcERJWj3TTcQPaojrgEed2gELSyomQxevh4iQdn6dE7IUKhSf6rGdGPK6JYYubAf0DXWQtai XFNPcpU6z+vQBvZe7aS8VRK0uu3omII1KLCe/zRcdykJavOyq6PngM0dqlJT4qjh1+sGQ5lvoEXEQ gJYJy4+g==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1t84Gy-00000001ZYI-0DQB; Mon, 04 Nov 2024 21:06:04 +0000 From: "Matthew Wilcox (Oracle)" To: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt Cc: "Matthew Wilcox (Oracle)" , Muchun Song , cgroups@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/3] Introduce acctmem Date: Mon, 4 Nov 2024 21:05:57 +0000 Message-ID: <20241104210602.374975-1-willy@infradead.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Stat-Signature: 3myosxyuiydmscnzm85exj9sheej8eeh X-Rspam-User: X-Rspamd-Queue-Id: E126E1A0025 X-Rspamd-Server: rspam02 X-HE-Tag: 1730754332-122014 X-HE-Meta: U2FsdGVkX18EsXOTY20BNe+TsfYQLSZYdwd6byE5i/N0qaKc1a8QavESOWaEz9FEKHIXlCcujzZuW0gjthXXz9ssE0v+pT1VepgwUvhnIFmUpPBZW9Pd5A6DAxPRRLg1plIfz4JRDi3+9y415KqpT7FIaLOxxerJzXHTSVzJX0HMfULZR3eBmMWlvNGqSE1m7EITYr7vVllctd3HU1BxD3k98NuA/qGTopfanCmCWw/9LD5v+nymL/oxe8087HFi+f78byPpHcNQVGzKwg8zvPNHUCk35juKk7BLbu+pUQLi+Jwkc57l+Jo5TyG3jK0Eo+0DGwVUcagOdZYeF2wg9mhyOZuLPq6fi5WCcghJzAA/v6wK263Sa/YRXchuwHdyaboinbrfjSJ26mjNngi0OV8S4UZQmxG3eLwt6zROXoJyCZRDFe7Qg+Ps77Ue9EyfhE3Wj5Tmnd6zZlhAgzYJzzosvnuXF62lCzVv1mu+s0KuAqh5UgPU6QptGoMvOf5UW70GQkmGQpq1prG92URu4a4ydVUYmVVHSjXGnr0zyjwZmlo4M9V6/34My3syJPZvzwC48jtGosUHqh4bWkyJ3mNYxHKwyx4qNUzQXFB0JYqBhIMEgULwN5NQvzK5KGDqj4+oG9GdQG9wKI0jUr5P2LU2gYMFxmeoDumzxJyoS9LFQDujem83bsmSmIlCIpEwMbRORqoL2EAhxeRVCkXxtGAFNW3mft/1j8rDRvW5JPEP0l+hPDBbbbtBDzNMqHX5Bzo5LiHKHEyT9bVMj+5pJD1huroEgn3DfX68LR3NWPEthG1IBLBjis/Z4ddu+2VQuBQxa26Y46J5w+6bjRXhKrAMPuac7FNxO/YX57Abtsu2qkS1wamkxkH7qUXWU9Hbo3gVn8JdM5eP6LZTmypoTm7Hzmgjmc1vxzZ44DXerzrgZhMS4nr60LougI8jWvrPGfF3A2YaWLrQTrbSGdU 4bBsmqf4 my1SFDE8r732JDWY7n1CZNx/kZ+lzAyB0COGqTyrAnbKZY3wlAcRDDET4qN0z5Orn2BekszQ0hPhKgMK59pVchlhy/VvgO+nzdiTfcAYqOuG4HWj/WFXaqyPUvJseIVyh3Rfp2Lj7SrnJcVj6imn5eNfULz9Uy9g0E2urmTxlux0D86C+k+o479d0XyLsYe67s5txhtEBFRNh6BhNeB0zkT6c9DzwCRlkcd53IpYqNqWqKIk= 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: List-Subscribe: List-Unsubscribe: As a step towards shrinking struct page, we need to remove all references to page->memcg_data. The model I'm working towards is described at https://kernelnewbies.org/MatthewWilcox/Memdescs In working on this series, I'm dissatisfied with how much I've assumed that every page belongs to a folio. There will need to be more changes in order to split struct acctmem from struct folio in the future. The first two patches take some steps in that direction, but I'm not going to do any more than that in this series. Matthew Wilcox (Oracle) (3): mm: Opencode split_page_memcg() in __split_huge_page() mm: Simplify split_page_memcg() mm: Introduce acctmem include/linux/memcontrol.h | 28 ++++++++++++++++++++++++++-- include/linux/mm_types.h | 6 +++--- mm/huge_memory.c | 11 +++++++++-- mm/memcontrol.c | 29 ++++++++++++++++------------- mm/page_alloc.c | 8 ++++---- mm/page_owner.c | 2 +- mm/slab.h | 2 +- 7 files changed, 60 insertions(+), 26 deletions(-)