From mboxrd@z Thu Jan 1 00:00:00 1970 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 2A111C02180 for ; Mon, 13 Jan 2025 18:25:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 839AC6B00A6; Mon, 13 Jan 2025 13:25:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7EA136B00AA; Mon, 13 Jan 2025 13:25:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B0E46B00AB; Mon, 13 Jan 2025 13:25:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4DFCF6B00A6 for ; Mon, 13 Jan 2025 13:25:47 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id ED5BAC0141 for ; Mon, 13 Jan 2025 18:25:46 +0000 (UTC) X-FDA: 83003257092.05.4FE4179 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) by imf03.hostedemail.com (Postfix) with ESMTP id 11EA22000D for ; Mon, 13 Jan 2025 18:25:44 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=cM1+iUKM; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf03.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.184 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736792745; a=rsa-sha256; cv=none; b=GZ3SWR+uMpXonuOnKs2W9PBHa8gG036jJo5HykdLw4RSb4qA+vLKsrzQFASfqu7lJaqyeC sbbTsoMr0ZwETaViRQmb1gHFcHZEdWXL6njyiU6YuFECcZ0fI9hhrJJWKyFSl13O1M56cV esXsDlezesdXKkDHRGOWwD4rQI6Pl1A= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=cM1+iUKM; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf03.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.184 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736792745; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=D+MaST8thgn46xOJAidrnY28Y7FV8o54uwUFMvYjaFE=; b=ryWEgUWnqXtn1mCSTDkt/PkP151+LkIdCnNzY1h4p3VsIhqoYWdYDRaMvbyZZgh+kkFcc5 Yz/BJjpltshSFiZc03X/RROy0rBn9MEw87fYQH76bN6bv05Ez2VEhKs7qLGREWA58mc9hF DmoFKuEsiEl8qb9GymmX16VExqhylUI= Date: Mon, 13 Jan 2025 10:25:34 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1736792738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D+MaST8thgn46xOJAidrnY28Y7FV8o54uwUFMvYjaFE=; b=cM1+iUKM/dwf6RTL+pOQ0mU/1ZyAQ986iC8uqYVkpIe+oXeXaCATA6PYClV0tSMx5kpwm6 3oAua3xdDxDKqWweLnFNv92uma02zBq8f/c80MlFqMRK4IyhFlS6WM+GX1lUfmQM/NTRw4 eaMPMkSrFpJGfHYzVb+IjuUVDPffaT4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Michal =?utf-8?Q?Koutn=C3=BD?= Cc: JP Kobryn , hannes@cmpxchg.org, yosryahmed@google.com, akpm@linux-foundation.org, linux-mm@kvack.org, cgroups@vger.kernel.org, Tejun Heo Subject: Re: [PATCH 0/9 RFC] cgroup: separate rstat trees Message-ID: <3wew3ngaqq7cjqphpqltbq77de5rmqviolyqphneer4pfzu5h5@4ucytmd6rpfa> References: <20241224011402.134009-1-inwardvessel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Stat-Signature: hcfyp8jp8przfnnmi1uimkbfzsqebc77 X-Rspam-User: X-Rspamd-Queue-Id: 11EA22000D X-Rspamd-Server: rspam08 X-HE-Tag: 1736792744-489664 X-HE-Meta: U2FsdGVkX19b2ePu/p83WCrpmM2W6zepx/6psMmtU7tGLgEK0v8Lt5d8wXPh69Cqh72m68ep+Vs4qcj3Xz0e+ZsvvdkVHPAu6KhQ20a+nvsTCN+/bjIt9tpdeovzCO9S/+v//Llc8FkPFTsevS2YLBnGJ+YbwGleLQnKjaqQGHRJLR8Y58pTRH8kHpfz2CAvx3h7JgTa+pmvONZ996Z8usRCKqCc+B8maxOGxqL1Mz6LDaCRrseblB3K0i+kM+BPG5Cyno3gzYOc7/G94G1TNh/HB5M0dHfRyC7/13F/DO/L6IpoC1K//qdAaYPBbSPGHnjoWsY1D0CQtpwOTFnAqLC/qF/7QyicB5OvO3Xac/fPqZgHfNhJZexSst7UHwEkwkri7JVPbX4HLRCqXm9WZM7UJEhNfRSRe+1Rwmvna7kjcQu0XxbH6dE1UF2xjOfiQyKIL6BHy+7Sbt3cTsiWzHpgihJim6t9NsUv/mtUYp3t4hYueX/w6Bc8eAyqlzPWMan5TOW22IzGkXjg8W9NOx9YHBrRpTEPSUp2ge1f8oztWrwwPhAa+PVPk7FlZqQXwEqOuhGMk/p6uqXcH81Qjf7ThdGaQ43I4dSXbXm57aCtIvUDKysodR5bQq69dyEUJFcH4nUrGc0kilI6YhV+PWyPJaJFR2rbyHpgmaaYh3fTa8xeYKl2TZ9yo3ee0Bfxlka3uQ81nmC1YEcxaiaKCCgCKtMeDUYFFt67EsJm7wj4xSLWXMpk1zKUL7utkD6xqSS0DYGrsN941/fN+/X9ndDPh0gciG9s3hC+0pDISeMFCusFJg7wOhMveAgwtU2uJkb5lOZ6oY53lrbEpjyAHgaiXlTSZ4wYHBdbNzCWgyEZ/lb30WpyQKGzJ8jiLt/IbfVjxFGIsqQPZgxjuhNkvRaoIWT77srbYD/daU4/ZdDSHtf6P7PKWA6TXA4d3hXZ01lgAp/uBfCXyyx0wRJ prO2hWV+ XYkDGYSZQa3aNaE9eOTo3MkQf84QG5Mche62SeKppaIytxktG815yqX98TE25N054+fdhw6Fsghj6TOfPSVPcwUkBuRBDPKf/JymjxOBwwmTwRWYi11ti2yhGEa+8aCOqeCYgwXgFeVJYIag7LuuTur68AGE7dmYnf4w/UHnQBtFsSsWo97IsPvrXdY2zW4dChDl9 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: On Wed, Jan 08, 2025 at 07:16:47PM +0100, Michal Koutný wrote: > Hello JP. > > On Mon, Dec 23, 2024 at 05:13:53PM -0800, JP Kobryn wrote: > > I've been experimenting with these changes to allow for separate > > updating/flushing of cgroup stats per-subsystem. > > Nice. > > > I reached a point where this started to feel stable in my local testing, so I > > wanted to share and get feedback on this approach. > > The split is not straight-forwardly an improvement -- The major improvement in my opinion is the performance isolation for stats readers i.e. cpu stats readers do not need to flush memory stats. > there's at least > higher memory footprint Yes this is indeed the case and JP, can you please give a ballmark on the memory overhead? > and flushing efffectiveness depends on how > individual readers are correlated, Sorry I am confused by the above statement, can you please expand on what you meant by it? > OTOH writer correlation affects > updaters when extending the update tree. Here I am confused about the difference between writer and updater. > So a workload dependent effect > can go (in my theory) both sides. > There are also in-kernel consumers of stats, namely memory controller > that's been optimized over the years to balance the tradeoff between > precision and latency. In-kernel memcg stats readers will be unaffected most of the time with this change. The only difference will be when they flush, they will only flush memcg stats. > > So do you have any measurements (or expectations) that show how readers > or writers are affected? > Here I am assuming you meant measurements in terms of cpu cost or do you have something else in mind? Thanks a lot Michal for taking a look.