Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2376576rdb; Mon, 12 Feb 2024 02:52:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJPCuT9hPlpJHDyYBUpeq2GlVIypITNp+/gxSMd/WmHwrR9vfls6CLfCpYWspE1SrPj8ET X-Received: by 2002:a17:907:3345:b0:a34:96e9:f46c with SMTP id yr5-20020a170907334500b00a3496e9f46cmr4446004ejb.31.1707735149909; Mon, 12 Feb 2024 02:52:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707735149; cv=pass; d=google.com; s=arc-20160816; b=yey8Db92hY80P9BM71NqvJxJ2s7n1elyHhWys/g6Vz/nHN1jV5Q3EdUVWarZiOlE2u BnuyPvMnDofTHUvVaZuTkM9/b+n2rk5xFneF61AnxTdfKuR9OqpYYjC7wpdpzwdCReOC HQf+DNAOkmzdZHyLe461/1wxCa84hNuBAiXRfM5Ky9INqFPAaBy4rUgOGJEqLIotzT3M XSWM0PmOD1zhZ0eCEm0LdmAzmfFPnQYWvle4cYdw+vhHVGqvhTYSMqpfrVZfoCijjPn6 4PGNpAhwa9o9OITh2s61cs+7IfYD0LvOpO8xerLgpu1YNujK3acCdqoGg+HwZBV2XRFl 0NSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=GOv5EwNnXjT+TCLOa0+VWxiT1ax/Bum8E+gI7T+VQWw=; fh=3hgXqGWfxMi9UG6N+cQ1RtJkHzi1cuKOtbi9jlgdPOA=; b=rbU27NyW7CBHc6OsJjX0p8yGi8jOESPemBAHTrPFe5XuQqrC5NdFjrt9unp8jh0nIM zsnzwdUIZvEy/+CqS4dzD38DLVPxzVp2xTVaWul3Fn6kXE1M1jYst191x8ff46etno0Y kZMn3ACkACXtdHgoY7enFVJTvxYQoRHSpGRoBpWZgPB+RCx+EgPJ32dDuCRfXFtPEv+u f7yzylfGTBA3g3bjreM/oq0zJe2j9u3oN7udty2Pb7dmi+PnydPgj4aSvdgjt7iyZSHl +VvHlg1x6fhDe5NC+Fgnxp0JOIupAyJO5zaSyvcyvQWwvvh85CF6IZaG6oI2l9zhoHW7 YkdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-61371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61371-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWet2QXsFMlmFcqPZne+0NqG5HEmyvYX1QtVSQMVoM4DlvAhHLZE+Agt+K1NZUwsMg4ylFIe1J5o6EOTI/obIMcC/ZEVHgKamOYLz5Jyg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a4-20020a1709062b0400b00a3c551aca35si67452ejg.626.2024.02.12.02.52.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 02:52:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-61371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61371-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 470521F24305 for ; Mon, 12 Feb 2024 10:52:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 488003A1B1; Mon, 12 Feb 2024 10:47:06 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 1525C3A1A3 for ; Mon, 12 Feb 2024 10:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707734825; cv=none; b=SL4grVD/+fd73Lh4HC15ZnzJtK8+b5YGov7GRdy0MChqiyicd6KCTdssvpWJoziYhS7liAhHs9tLfl1/yD5UqsYF8sYFhtFgSl1qsU+g3mqvvIhS9EKi7rmQjS4rlCnBrA0mfXW5aR/A9faUuL/gDhiBrGVq/7Ts4k+yIhVkWGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707734825; c=relaxed/simple; bh=jGnr0+O9DZqdVBEJOnvpErLfdj7poycde5lERZ7vgRI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ixrw7QyZFb5AdZRrtqkFRE/awdbGQD5jZP2Yg9Fpze3NjZWCHUPacgjqjNVQqcmEQegDWjlgnQDmmryNzaoMLeIfnGYHE932PYYQPt7OJ0COUWLZ3d/99GeDVXOvmsqumI4ph5TJZx7LvMM3pcdoiiYxTpXNqhyzdCYGj7Yyw/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz 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 5460022150; Mon, 12 Feb 2024 10:47:02 +0000 (UTC) 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 3C54612FF7; Mon, 12 Feb 2024 10:47:02 +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 SjwPDib3yWUUGQAAD6G6ig (envelope-from ); Mon, 12 Feb 2024 10:47:02 +0000 Message-ID: <9081f1ca-825e-4285-9b22-854d265e3af3@suse.cz> Date: Mon, 12 Feb 2024 11:47:01 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 3/4] mm,page_owner: Display all stacks and their count Content-Language: en-US To: Oscar Salvador , Marco Elver Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Andrey Konovalov , Alexander Potapenko References: <20240208234539.19113-1-osalvador@suse.de> <20240208234539.19113-4-osalvador@suse.de> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 5460022150 X-Spam-Flag: NO On 2/11/24 21:39, Oscar Salvador wrote: > On Sat, Feb 10, 2024 at 08:52:25AM +0100, Marco Elver wrote: >> The extra bits are used by KMSAN, and might conflict if enabled at the >> same time. I think the safest option is to keep your own list. I think >> that will also be more performant if there are other stackdepot users >> because you do not have to traverse any of the other entries. > > Ok, I thought we had spare bits for other users. > But thinking about it some more, yes, it makes sense for page_owner to > maintain its own list, so traversing it is faster and we do not have > to place code to traverse the buckets in stackdepot. Would it make sense to introduce per-user stack depot instances? ("user" being a subsystem i.e. kasan or page_owner). I'd expect each to have a distinct set of stacks, so there's no benefits of using the same hash table, only downsides of longer collision lists? I can imagine this would be easier for users that don't need the early init kind of stackdepot, but maybe even there it could be feasible to have a small fixed size array of hash table roots and every user would get a separate index?