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 29A0EC28D13 for ; Mon, 22 Aug 2022 19:36:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FEE38D0003; Mon, 22 Aug 2022 15:36:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AD488D0002; Mon, 22 Aug 2022 15:36:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 080F38D0003; Mon, 22 Aug 2022 15:36:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EC1078D0002 for ; Mon, 22 Aug 2022 15:36:16 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id BCCD11C5BF8 for ; Mon, 22 Aug 2022 19:36:16 +0000 (UTC) X-FDA: 79828234752.28.21BD279 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf21.hostedemail.com (Postfix) with ESMTP id 96DA51C033F for ; Mon, 22 Aug 2022 19:35:01 +0000 (UTC) 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-out2.suse.de (Postfix) with ESMTPS id 0946C5CA41; Mon, 22 Aug 2022 19:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1661196900; 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=8LOpaT2Q971EUbjBeeWliYNilDBmmPl4LkCkk2UWfDk=; b=pGEsQUrii2Ffpmtr8KAOdRMqyQVwo8KxxpKgeV2D/hGy/FAz5HnnGfP7IbIGRpYoALy/83 Z0JgiA3PYFUqXzFCRRTdOyzmioQ6Bv6y4aiwX2z9ik5cMyyYrSK5ef31rrS/qDgN6JTj/9 FKohA1XnzPJ/oDg92mSqV9HH3EYkttw= 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 DD8BA1332D; Mon, 22 Aug 2022 19:34:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id BZy/MmPaA2OcbgAAMHmgww (envelope-from ); Mon, 22 Aug 2022 19:34:59 +0000 Date: Mon, 22 Aug 2022 21:34:59 +0200 From: Michal Hocko To: Roman Gushchin Cc: Shakeel Butt , Johannes Weiner , Muchun Song , Michal =?iso-8859-1?Q?Koutn=FD?= , Eric Dumazet , Soheil Hassas Yeganeh , Feng Tang , Oliver Sang , Andrew Morton , lkp@lists.01.org, cgroups@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] memcg: increase MEMCG_CHARGE_BATCH to 64 Message-ID: References: <20220822001737.4120417-1-shakeelb@google.com> <20220822001737.4120417-4-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661196901; a=rsa-sha256; cv=none; b=yScJ2vOxGYA7SJckTdlsXS6t9LVZ2g+5AjHoSDcdCkwxSg00G97jTf9vw4+lxjdxb3qnvO kvx8ElhHPU3NLu8sMDXI1KpP5OjyZwTPzPf5TfjeDRmPqUotAM2psTjPE1u9SpyA9nQbJ7 mRdL/kuwzG0q906bUjtnd2hPbhd1NEo= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=pGEsQUri; spf=pass (imf21.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661196901; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8LOpaT2Q971EUbjBeeWliYNilDBmmPl4LkCkk2UWfDk=; b=kZBOFSs4my6j4i2rLrDkVKWsZHT3BQuIy3VpHo4KZUg5e7Lr0goL+G7IHGSj7ua8xktWld FrdFh/k35wPTLXLwZv1czO9HEvwJ8Bp9Ah08HU74ykBbRtVD1Dde0N42gBUxs0J5Vk/AVI 7oxwqpfK+Pyeu7WkSNwSDhZ+oy/D3wE= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 96DA51C033F Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=pGEsQUri; spf=pass (imf21.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Stat-Signature: tfp1orjbiewjf41rzfjxx54picx14zjh X-Rspam-User: X-HE-Tag: 1661196901-927927 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: On Mon 22-08-22 11:37:30, Roman Gushchin wrote: [...] > I wonder only if we want to make it configurable (Idk a sysctl or maybe > a config option) and close the topic. I do not think this is a good idea. We have other examples where we have outsourced internal tunning to the userspace and it has mostly proven impractical and long term more problematic than useful (e.g. lowmem_reserve_ratio, percpu_pagelist_high_fraction, swappiness just to name some that come to my mind). I have seen more often these to be used incorrectly than useful. In this case, I guess we should consider either moving to per memcg charge batching and see whether the pcp overhead x memcg_count is worth that or some automagic tuning of the batch size depending on how effectively the batch is used. Certainly a lot of room for experimenting. -- Michal Hocko SUSE Labs