From patchwork Tue Mar 19 18:32:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 13597010 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 99F54C54E71 for ; Tue, 19 Mar 2024 18:30:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9A516B0083; Tue, 19 Mar 2024 14:30:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E48496B0088; Tue, 19 Mar 2024 14:30:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE9966B008A; Tue, 19 Mar 2024 14:30:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BC9F56B0083 for ; Tue, 19 Mar 2024 14:30:57 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 66EDB809D4 for ; Tue, 19 Mar 2024 18:30:57 +0000 (UTC) X-FDA: 81914630154.01.61E06C4 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf18.hostedemail.com (Postfix) with ESMTP id 4B6291C0020 for ; Tue, 19 Mar 2024 18:30:55 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=caaEPWcP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=iJtQjLGu; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=caaEPWcP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=iJtQjLGu; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf18.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710873055; 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=0Rw2uEgVepVXkvdzA8HFqFNjKTu2AlQBuAZXsdS6Koc=; b=w9cBKedyLtZuFfmliWUf/mXkcQBPHF9E5BLQ7bKFa86/gAd4OQC39t0Euie/OKnOnIA8Ep nYpjke1cZio3axK/I8QNqMOpDKHqZcbNQeqkW2SxHpbdlxNCmLj2UB08ZLe9uCkkU5wR4u e74s7QmrswokFi9hQR1VcwlqRX/YfFY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=caaEPWcP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=iJtQjLGu; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=caaEPWcP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=iJtQjLGu; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf18.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710873055; a=rsa-sha256; cv=none; b=gW1uiG1vXcNl9xYjH4Rp+yrEvgpEpMsZjfq2/C37h7RzQh6bflx4VN9aHuX2kdry5WncNT XgSvR6iIaI0mywYZ0thojkV7Jh47K8B/9pMvkix5M1sekhRHtaa/IMC+hD4b+psQXkruvB yc8cVo9f4qigSrjPq65IYpEK3S7sx/A= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4B54E21E7A; Tue, 19 Mar 2024 18:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710873053; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0Rw2uEgVepVXkvdzA8HFqFNjKTu2AlQBuAZXsdS6Koc=; b=caaEPWcPP1oryvPK0V0xBCqMnpJzIGO0JeZT6ATEWoaz+MOCNStaGHtvuOR3w6lw3dcEDn /HHDGhZZyVR5GU4YjQ8WHo11Q6CRMrDeIKV5S0hNJ2DaRRDHHgcAaaAFcIqR7zvBbCB6ih I6pajdlP5X62XsGduozbhEjmn2GuMqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710873053; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0Rw2uEgVepVXkvdzA8HFqFNjKTu2AlQBuAZXsdS6Koc=; b=iJtQjLGuKQjcC3jWZ5ixi8Gi4+sHrQfMzZVrejrwK/aiqPRMPv5zGGMAWVn4MKq++A7Z/R b7ijVR0yLoR8UIBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710873053; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0Rw2uEgVepVXkvdzA8HFqFNjKTu2AlQBuAZXsdS6Koc=; b=caaEPWcPP1oryvPK0V0xBCqMnpJzIGO0JeZT6ATEWoaz+MOCNStaGHtvuOR3w6lw3dcEDn /HHDGhZZyVR5GU4YjQ8WHo11Q6CRMrDeIKV5S0hNJ2DaRRDHHgcAaaAFcIqR7zvBbCB6ih I6pajdlP5X62XsGduozbhEjmn2GuMqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710873053; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0Rw2uEgVepVXkvdzA8HFqFNjKTu2AlQBuAZXsdS6Koc=; b=iJtQjLGuKQjcC3jWZ5ixi8Gi4+sHrQfMzZVrejrwK/aiqPRMPv5zGGMAWVn4MKq++A7Z/R b7ijVR0yLoR8UIBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A2FC6136D6; Tue, 19 Mar 2024 18:30:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CI/7JNzZ+WUcTwAAD6G6ig (envelope-from ); Tue, 19 Mar 2024 18:30:52 +0000 From: Oscar Salvador To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Vlastimil Babka , Marco Elver , Andrey Konovalov , Alexander Potapenko , Tetsuo Handa , Oscar Salvador Subject: [PATCH v2 0/2] page_owner: Refcount fixups Date: Tue, 19 Mar 2024 19:32:10 +0100 Message-ID: <20240319183212.17156-1-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Spamd-Bar: ++ X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 4B6291C0020 X-Stat-Signature: jam4keijgswnxr5h5hdwkzf5cc1f6nnk X-Rspam-User: X-HE-Tag: 1710873055-315885 X-HE-Meta: U2FsdGVkX19k80i8P/5xOLb5rY7xyF8Hjdmpd3gxmaRxzQ6lnyS+wOJncJ5VH5NH60L9efVHHzgbgdMw3qJYifggs2WFxyJyw5RHnWuOhYBIRpUp4G1KcsLbBZUDYXkstND5rhXrUy89XoPh9j7YUSQvcIvxxNdxumB4jQ+UXwtOSLHEFJEH3gu+9UdtqEM3K+GrCkz5xbKcwxrUHR7sYB9/d9QsMccaoC+hfwa+rpLpnsBGMhpRk13LfAOkI46/m3YlxYqLk5qNrIa7w9a6z7Ob117RUB2pnu9lO0WjkghBgQmQjU7NmcSQzsY3SOoPeeYGFBe1B10XN/2nAWfbdUG2yuzPE7JpBmG9Fpqh3Ni3WH5iOBTSswpJPwd4COTodPpHEZcAy2lUOutVnox1MLTO4IX0z/29EKfB1PoQv2bgkmdg+mWtVDPGL6GH9k1b/K3vjqvSHaf9yul1Cx564oaHijaleg8LEZeMaNGOID02AkmzHDBlX5zGGqpFh9MEPIOQNgDyALeeOs+nO9BIuzXTK4p6cPP0PMaEbAAN+T0Q9/qNsMaK7wk23UjoU26U4Mfg464+tzHE34NFvVR+0RC/NWrH3ypelbNl7TMHWK/KypJHZcxpvLzFF7MmTmgiFfveLDu9++G5vdsUH8Qj95Lvj4p3KxXuLcbYPHELZ8fHaLXA+pp81yPNzzs9sGyurRHGwsTReYL1rlAPm9W4QS7TU9e3Rt3RFbHCfUmNllw65X1xQowRMplFbbpPjDnVh+z+xFK8LqF3cn+zzbAjLUQBm23suUPsMsVJAKgooVDkzQBuJIOmhn7uj1HiY1BrkCH0VPL82LFssR7FPzW8ATaD1x34eFj6SRYhdluX3CDyW2CSHb0TRR30Tg7yzDVvN7iE6407sOnwEr++WswvNGgHQhc8I6AVCCJDA68HCG3BATHVcLiok4CKx/T9A42CUeTFwOUq5ODKdvg/Zv9 vny3ynMq w/jQy1M9nAqdQeo0Sv4FQCaQJ/sl/WMZWIg8h 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: A couple of fixups for the refcounting part. From this series on, instead of counting the stacks, we count the outstanding nr_base_pages each stack has, which gives a much better memory overview. The other fixup is for the migration part. A more detailed explanation can be found in the changelog of respective patches. Oscar Salvador (2): mm,page_owner: Fix refcount imbalance mm,page_owner: Fix accounting of pages when migrating Documentation/mm/page_owner.rst | 73 +++++++++++++++++---------------- mm/page_owner.c | 51 +++++++++++++---------- 2 files changed, 68 insertions(+), 56 deletions(-)