From patchwork Tue Mar 26 06:30:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 13603615 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 4B1C5C54E67 for ; Tue, 26 Mar 2024 06:29:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D78F56B0092; Tue, 26 Mar 2024 02:29:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D29D56B0096; Tue, 26 Mar 2024 02:29:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF1336B0098; Tue, 26 Mar 2024 02:29:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B08A26B0092 for ; Tue, 26 Mar 2024 02:29:15 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8100D408EC for ; Tue, 26 Mar 2024 06:29:15 +0000 (UTC) X-FDA: 81938213070.14.8B6FD3E Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf12.hostedemail.com (Postfix) with ESMTP id 470ED40003 for ; Tue, 26 Mar 2024 06:29:13 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="A5M3s/dW"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="A5M3s/dW"; spf=pass (imf12.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711434553; 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=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; b=E4qd364QerSLujk1bqoEdNZrKAfTtumMg2pDMvkOpAYSg33m44RE718AwKn14TQ9359u3l bM4D/TLUm890vOD9aRtukFx4zyVIWPjuK14QAWc1wJBHTXPf9h/rcQ3MdiUrvZkH7EzUwz zjLTTW/7TwAk3DywKP2hDRyYoMVeg8o= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711434553; a=rsa-sha256; cv=none; b=nJNq/DbM//2Al1Zv0FigUzrxHMH4jfyuFH8q1AU61NzwJr9H2UhvCLxNmPXcauVIBcAaC0 9Zhi8qChURH+cmdEeQYZqEC4dIDihT2hEbQ0YevEEbFlP0D0e/oJGIOIHpbZ3ngluMSfsC C/XT89DVLgJoof4cRYdbrN04sZftp6k= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="A5M3s/dW"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="A5M3s/dW"; spf=pass (imf12.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (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-out2.suse.de (Postfix) with ESMTPS id A30205D1CE; Tue, 26 Mar 2024 06:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711434551; 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=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; b=fqJ8EWqWij0dR5Wai3crdsBjXjDkUlSvf/c679i04CZp/QAwqlVh5r8tFNvHKBdPeVwfwx GlO7sC5UybTaclhIfQPvQS7qWngZ63tBGM+VgeYikPi5H4B46b2tx45QlcJih/gm6Us8EX hj+8HS2enVIrOcCDJI0B1yTp7au/aD8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711434551; 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=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; b=A5M3s/dWcBp4glOZoqnQnmLFq5EbYBMBUYOc/vbRsyzfdx0guUDHVdAC1tPSPiZP2AroAu sRw0KxghenkiDNCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711434551; 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=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; b=fqJ8EWqWij0dR5Wai3crdsBjXjDkUlSvf/c679i04CZp/QAwqlVh5r8tFNvHKBdPeVwfwx GlO7sC5UybTaclhIfQPvQS7qWngZ63tBGM+VgeYikPi5H4B46b2tx45QlcJih/gm6Us8EX hj+8HS2enVIrOcCDJI0B1yTp7au/aD8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711434551; 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=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; b=A5M3s/dWcBp4glOZoqnQnmLFq5EbYBMBUYOc/vbRsyzfdx0guUDHVdAC1tPSPiZP2AroAu sRw0KxghenkiDNCA== Received: from imap2.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 imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 19C7113215; Tue, 26 Mar 2024 06:29:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id CiV8AzdrAmY2YQAAn2gu4w (envelope-from ); Tue, 26 Mar 2024 06:29:11 +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 , Oscar Salvador Subject: [PATCH v3 0/3] page_owner: Fix refcount imbalance Date: Tue, 26 Mar 2024 07:30:33 +0100 Message-ID: <20240326063036.6242-1-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 470ED40003 X-Rspam-User: X-Stat-Signature: j75u3hymacec67ga9zgc5dwucakmakqb X-Rspamd-Server: rspam03 X-HE-Tag: 1711434553-143697 X-HE-Meta: U2FsdGVkX18jjFwtlG/zi3SOHHrISszlmjcqsBlVqms0qas/TfLQwxxGxFtJtPh1qdGat2C8b8n69/mz+jhLNpWsc+raJzwCngCTiMxYzhDU7AkZShxeNumSAAO8nQT0/gFACZt3JcMbalaC2kSKvHx6/AsylMvSsostyafXvSZVL3p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YsZLZZcJXIO/UL6cjA== 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: This series consists of a refactoring/correctness of updating the metadata of tail pages and 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 us a much better memory overview. The other fixup is for the migration part. A more detailed explanation can be found in the changelog of the respective patches. Oscar Salvador (3): mm,page_owner: Update metada for tail pages 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 | 184 +++++++++++++++++++------------- 2 files changed, 146 insertions(+), 111 deletions(-) Tested-by: Alexandre Ghiti Acked-by: Palmer Dabbelt