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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B7C2C433F5 for ; Wed, 13 Oct 2021 18:01:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28821604DC for ; Wed, 13 Oct 2021 18:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236616AbhJMSD3 (ORCPT ); Wed, 13 Oct 2021 14:03:29 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:46258 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhJMSD2 (ORCPT ); Wed, 13 Oct 2021 14:03:28 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9520E219C7; Wed, 13 Oct 2021 18:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634148083; 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=5NE66Dj/QGO/V+dUIB7Cr5kb37zCYA6r5tio5RjzNII=; b=B5V05/9o7Qyc+X/mDJCKHrJHU6FQg67zI22a1OGNF5iATFfW4V+ZU+C3WOUGmUajfs4qXT b99ySrjT5mzdxKSCuG0VXQ051wZ81Y+pAXYTdRsnw0QOlXMlLv1cVG9822BZobjv//KMc6 y/fzTXdhw/CXtYD2grraAEdVjDxI85s= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7BE8813D10; Wed, 13 Oct 2021 18:01:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PX2IHfMeZ2G2PQAAMHmgww (envelope-from ); Wed, 13 Oct 2021 18:01:23 +0000 Date: Wed, 13 Oct 2021 20:01:22 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] memcg: unify memcg stat flushing Message-ID: <20211013180122.GA1007@blackbody.suse.cz> References: <20211001190040.48086-1-shakeelb@google.com> <20211001190040.48086-2-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001190040.48086-2-shakeelb@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Shakeel. (Sorry for taking so long getting down to this.) On Fri, Oct 01, 2021 at 12:00:40PM -0700, Shakeel Butt wrote: > There is no need for that. We just need one flusher and everyone else > can benefit. I imagine a cgroup with an intricate deep hiearchy with many updates and a separate (simpler) sibling/independent cgroup that would need to pay the costs of the first hierarchy updates [1] when it asks just for its own stats (bound by the amount that's leftover from the periodic updates). The stats files (or wb stats) are likely not that time sensitive and the reclaim (that can be local only but is slow path anyway) already uses the global flushing. I wonder whether the bigger benefit would be to retain the global stats_flush_threshold counter but flush only local subtree. Thanks, Michal [1] At first I thought non-memcg updates would interfere too via rstat tree but I see it's actually filtered with the stats_flush_threshold so only foreign memcg updates are relevant. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH v2 2/2] memcg: unify memcg stat flushing Date: Wed, 13 Oct 2021 20:01:22 +0200 Message-ID: <20211013180122.GA1007@blackbody.suse.cz> References: <20211001190040.48086-1-shakeelb@google.com> <20211001190040.48086-2-shakeelb@google.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634148083; 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=5NE66Dj/QGO/V+dUIB7Cr5kb37zCYA6r5tio5RjzNII=; b=B5V05/9o7Qyc+X/mDJCKHrJHU6FQg67zI22a1OGNF5iATFfW4V+ZU+C3WOUGmUajfs4qXT b99ySrjT5mzdxKSCuG0VXQ051wZ81Y+pAXYTdRsnw0QOlXMlLv1cVG9822BZobjv//KMc6 y/fzTXdhw/CXtYD2grraAEdVjDxI85s= Content-Disposition: inline In-Reply-To: <20211001190040.48086-2-shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Andrew Morton , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hello Shakeel. (Sorry for taking so long getting down to this.) On Fri, Oct 01, 2021 at 12:00:40PM -0700, Shakeel Butt wrote: > There is no need for that. We just need one flusher and everyone else > can benefit. I imagine a cgroup with an intricate deep hiearchy with many updates and a separate (simpler) sibling/independent cgroup that would need to pay the costs of the first hierarchy updates [1] when it asks just for its own stats (bound by the amount that's leftover from the periodic updates). The stats files (or wb stats) are likely not that time sensitive and the reclaim (that can be local only but is slow path anyway) already uses the global flushing. I wonder whether the bigger benefit would be to retain the global stats_flush_threshold counter but flush only local subtree. Thanks, Michal [1] At first I thought non-memcg updates would interfere too via rstat tree but I see it's actually filtered with the stats_flush_threshold so only foreign memcg updates are relevant.