Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3132895lqp; Mon, 25 Mar 2024 23:29:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW58fkrsbLGXQ1FfB52kMgts/g7z07Gvu9XL6ooiU59jQOT8y04jhgouAGdBrNgPTevIwulcQIHMoun+H1uLPCNj7W9xZPXDd3UbaezVA== X-Google-Smtp-Source: AGHT+IH9IYl4ndCBgBZ4k6A1eyt/MQVydkiVwCUJWJXnB4N0a1q21eNS7XM7zMdOBbdhdsY+AV67 X-Received: by 2002:a17:902:b215:b0:1e0:1bb2:b38f with SMTP id t21-20020a170902b21500b001e01bb2b38fmr138209plr.59.1711434563409; Mon, 25 Mar 2024 23:29:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711434563; cv=pass; d=google.com; s=arc-20160816; b=wn2XDAojCOBCx5t9u+oS4MVsTBWsAITlDPWbtFCbeOGDkLRcMhmglZa0sVDRMR5x7g PUnMl5pd2EnvbaD9+1g9DYVILBPQCtKXjQ9mh6d9rM7S13YpoMVkKmquawYmbiLxdlAe 7aGKE6Wkd7WsUhCHZJP/bd11km7eCfLyp5PUQe3VwJNzbLbEX8nA3tZEjGisg7+7gxG+ pK596pTfsvypyxS87Z4BG3BgI8BEfse8QsrtYlJrhk8j/Km42ix3v5UNsPvTCNeFnfJP izUukATzqI1meGJYFbVeyjjwyPmrr6z7CtbnH9gJrgKycSN4JssYYK4MX8ZV088Axe9a wHPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=7DbD7neTBtkVj5P37sm9WRAjkZnH4d5JwCZylV5kafQ=; fh=xsvI7l1HeEjfi9GLdU9i1+gXWs6iCG50UXVPhs7pR1M=; b=ZjasDvcRlax1pB04NAkgplk+FfnU75aHQpjMLQScklKjyefOnzsDaDUJJ0c/Dl4I38 Q6BokbCMYQEgll99YCyYamyeXx+3MxzHIjAAK8YqCp1U7MatLD5SOOACvbsBZQcAWZM+ ujR71BODT12GgV0A7Ruoi8GE6nZPTp3oWsxW4zlVz7Bq/A0svPyFGw1PoZU11EzSqhxk FnjxyVNEfRXsVJCISAKBTlH6YtsOb9mPH3PRGqKwW/aVgHFmsWmXCIXEXuWRofbYGJo5 xy5OwYt0AvUt+ydQzRFsYCalS3CaiQh8LTNO1bxnlN6Ph+W3gFCz778qqc6zifpZOODk Cvgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-118409-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p2-20020a170902e74200b001e0b883e2e8si4149694plf.86.2024.03.25.23.29.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 23:29:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118409-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fqJ8EWqW; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-118409-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 065B229E486 for ; Tue, 26 Mar 2024 06:29:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEB90130A47; Tue, 26 Mar 2024 06:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fqJ8EWqW"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="A5M3s/dW"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fqJ8EWqW"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="A5M3s/dW" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0A3074BEB for ; Tue, 26 Mar 2024 06:29:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711434555; cv=none; b=ZC/0jP0BBYULzChNOCjCUw/7f1G4FjBQQ1HIGXTdonNY6nqiP1DgO9CQhWjJbGXE9PEDxVKFSv6lFFeySIfRXCXqPevlGYOxyEEo+duJ/fIP5HN5tJf7u2guffCOSr12P8x+qpSvCky4U8JrjFN33GoB1He0DHlrWKjODmfBqHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711434555; c=relaxed/simple; bh=X3DtID22MHLiOSEgufzjJEVz5dkjcxPNV3/gFfp+uKU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Tl4US4xNDd+D3T7WXSUjA1Uqqk6jqnmLt46GZ/gAbhe0tvjLcKYdQ84JRf0TL1yglFJ8FjlM0hsKVWrg6VcDX6fIFQwmd/OOhznrPP6GUR33d3DNuG5RaHjfTU1ORkBDHhpYEkkHF3ts06sMdXMazlzq+/xKqzDTWwsmHxbLFLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fqJ8EWqW; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=A5M3s/dW; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fqJ8EWqW; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=A5M3s/dW; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.61 X-Spamd-Result: default: False [3.61 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,kvack.org,suse.com,suse.cz,google.com,gmail.com,suse.de]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.09)[64.13%] X-Spam-Level: *** Authentication-Results: smtp-out2.suse.de; none X-Spam-Flag: NO 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(-) -- 2.44.0