Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp12787rdh; Tue, 13 Feb 2024 08:03:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWhVnHcNZJ3iJT7loEgdLdBdkc3Qqq7sZhZYgu6ohhALq2RrrqVEKCZkEE6WEOzEaGQkYpUyXAS+y/+1eVNsF6yF8OIS+jXWFdaIEoogw== X-Google-Smtp-Source: AGHT+IHy1YNTEn+WbgLEJzOENTTYBuW7W28hKXVM0GBsaJjNRgw2XDxWws8hePNXkeK/jJlf/ZtM X-Received: by 2002:a17:903:44b:b0:1db:51c0:c203 with SMTP id iw11-20020a170903044b00b001db51c0c203mr113406plb.24.1707840227371; Tue, 13 Feb 2024 08:03:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707840227; cv=pass; d=google.com; s=arc-20160816; b=fkoTaZ/OclY/TNt7zFoeKiFfKiH9lTbXljvKtNF1dO2YyQT/ZlBvbiQ2R+o4qREqsk kS38FQ3um2ndraBHS/rDqscwTVXA2+zFyDIQddL/nBAN2nRcEW7qPWqR7NVCaT03d4BC raxn6h9sM89Dkw9euT0PsBwBHwmfXfelbE/zH5+3FrRD6nkLjfQu1RvlS2MQFJpLGrAd TDr6fjxtV34Zk6oNqLR+RoOFzWu3G6UbVgTl4KB0VPx+CLamgLiKypNHd2hr7Kg+iQq4 XHZc11YRgHxDeVs5EXQmdUzTEfpJZ9qd6Vhe3+YMGJpYH/2c1K91bwhCpsVOtHV9Uccl WQMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=FRNhjJkgXL7v16ZU0iS2vdAZzEHkrAUpw4bf8r6ZDEw=; fh=ssRQnsQCUODIo12NHb6s1sv//Gtmuce3TYldiYYH6As=; b=LXxC39f3s7H6ZA6C6a7MDKpRuZJ4yQyupzzBuDpt4sgiIb2cpgaPDc+pkVkdJgWOBC UGM39FSo/+LH2YhQPAn58hp6QlFS10QdojX19Ipn2Wr8uOUySLPmryWMfi/1LwqYAX+D hTunwGjO9Z0ca2RGmuzzLPw+0xtmFZFT0xMGcw5AVse5Eq73JXy9eAlJyNKo9J2hdDg5 TKXlhJAkRUUlITy8Ad7T85zb65wcXsgcAA4dpnkJRypUJ3RPbJGH3mXZMaeht/HUpnyR 72SMb0Wt7UwoPVB1NwhGPA6uqai0wQnZwjJFBZUJhM5faMGhT/rSUYFSyFRz5ID2i7a4 wttQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zy+f35Fj; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zy+f35Fj; 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-63854-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de X-Forwarded-Encrypted: i=2; AJvYcCW2i6/N/GNsjTY8ZAO+HAB9TxXJSC8I52jWTurrbjBV7U3YT1mCEK4yoQoaINALjFYJzvzscwDK7wLcJUeTxENM5Cc0FvmniublFd5fHQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ca27-20020a056a02069b00b005dc854a1d02si1395723pgb.230.2024.02.13.08.03.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 08:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63854-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=Zy+f35Fj; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zy+f35Fj; 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-63854-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63854-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 0688D2844F0 for ; Tue, 13 Feb 2024 16:03:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B06885F559; Tue, 13 Feb 2024 16:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Zy+f35Fj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="FE8XoO3Y"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Zy+f35Fj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="FE8XoO3Y" 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 33CEC5F491 for ; Tue, 13 Feb 2024 16:03:38 +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=1707840220; cv=none; b=o911ngiCgETRnEZze8QJXl6OqeXf9b3ApjWNTbiGgosNzUxOaCJQg2zU/kKLChMTxM+CwArW88tSlVO6gdU0Q1VbllmJQNb7wj9JeTNX/uJ0p2ImIcCss0OouZwk2/Xn5UIoo72yK03+cHWHakT2sbthRwCnfXlrtRGfopH5/6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707840220; c=relaxed/simple; bh=rPDyBYSXDCsz5GJMe18opVkoOGsbwpQe287yIr4tPqI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZmXhn/3D7G8tWT8BWufU6nu2Hps6ZNF0SALEx+KbkeLeKJL3Vwn2lkeCRbn0rGXQTef7sKXS6vnow1FmBr5GMhBTXsZcBPglsyXlYO1M1tc0Cxo5xfgDwuY6c+Jy1w1YTdkx75s7hvNd0Srl6yTSUgAUpSxnbIFQxbg/HY2Vs7w= 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=Zy+f35Fj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=FE8XoO3Y; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Zy+f35Fj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=FE8XoO3Y; 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 [IPv6:2a07:de40:b281:104: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 CC1A01FCE6; Tue, 13 Feb 2024 16:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707840213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FRNhjJkgXL7v16ZU0iS2vdAZzEHkrAUpw4bf8r6ZDEw=; b=Zy+f35FjpVmxtg237HXhU3wXU4q82NcWwOfCXnQm6NcCnHtYS8itTBh5i9ty1JqgapXpIu mC3lB2vZ/C9YdPgoytALScmPR/UDV1uYoHrmOdux1SFNrNZKrD+IgPYIqobqsOYR9M26BT jwAWpjb+cBrbDmJ5qlfl2lFoozubtEg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707840213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FRNhjJkgXL7v16ZU0iS2vdAZzEHkrAUpw4bf8r6ZDEw=; b=FE8XoO3YAebclHOu7Kze9qUhPPIPinRmWaprVrIK6Q8n0kkOLGEEUQoD/aLo1zdKLXMUMY lhf37WClN5sYdNDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707840213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FRNhjJkgXL7v16ZU0iS2vdAZzEHkrAUpw4bf8r6ZDEw=; b=Zy+f35FjpVmxtg237HXhU3wXU4q82NcWwOfCXnQm6NcCnHtYS8itTBh5i9ty1JqgapXpIu mC3lB2vZ/C9YdPgoytALScmPR/UDV1uYoHrmOdux1SFNrNZKrD+IgPYIqobqsOYR9M26BT jwAWpjb+cBrbDmJ5qlfl2lFoozubtEg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707840213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FRNhjJkgXL7v16ZU0iS2vdAZzEHkrAUpw4bf8r6ZDEw=; b=FE8XoO3YAebclHOu7Kze9qUhPPIPinRmWaprVrIK6Q8n0kkOLGEEUQoD/aLo1zdKLXMUMY lhf37WClN5sYdNDg== 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 545EE1329E; Tue, 13 Feb 2024 16:03:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id kUPbEdWSy2VSBQAAn2gu4w (envelope-from ); Tue, 13 Feb 2024 16:03:33 +0000 Date: Tue, 13 Feb 2024 17:04:38 +0100 From: Oscar Salvador To: Vlastimil Babka Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Marco Elver , Andrey Konovalov , Alexander Potapenko Subject: Re: [PATCH v8 2/5] mm,page_owner: Implement the tracking of the stacks count Message-ID: References: <20240212223029.30769-1-osalvador@suse.de> <20240212223029.30769-3-osalvador@suse.de> <8ff46f99-d167-448f-9aae-a634b8aae4d0@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Level: Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Zy+f35Fj; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=FE8XoO3Y X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.31 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; 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]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[8]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FREEMAIL_CC(0.00)[linux-foundation.org,vger.kernel.org,kvack.org,suse.com,google.com,gmail.com]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.80)[99.15%] X-Spam-Score: -4.31 X-Rspamd-Queue-Id: CC1A01FCE6 X-Spam-Flag: NO On Tue, Feb 13, 2024 at 04:29:28PM +0100, Oscar Salvador wrote: > I thought about giving them a refcount of 1, because we only print > stacks which refcount > 1 anyways, but setting it to 0 has comes with > the advantage of catching spurious increments, should someone call > refcount_inc on those (which should not really happen). On a second thought, I think we want a refcount of 1 for these stacks at the beginning. So should we e.g: re-enter page_owner, we would increment dummy_stack's refcount. If refcount is 0, we will get a warning. -- Oscar Salvador SUSE Labs