Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2737049rwa; Mon, 22 Aug 2022 12:45:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cnjgniHunyPNNpwy91SNMa0pFgN7D6oaDlC5TCc8OvNQ/he2b3cSJ1uUBve5o4GF7HURw X-Received: by 2002:a17:906:8475:b0:73d:97f9:47ea with SMTP id hx21-20020a170906847500b0073d97f947eamr419661ejc.695.1661197501124; Mon, 22 Aug 2022 12:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661197501; cv=none; d=google.com; s=arc-20160816; b=RGo/if1Qe8ukhL2sfdmnJT9EMdG3p3dFabK3H7RStHWv4B5c35Xj+VzQ1IrelZy46W 1n5KQldqbvgMb407rD88/j7Kw53B2uCtcz22VxWt3wGdGir0r+HIvx+nH4dkKk8rrx3q TXDmVeA3b1QnJehWQY6FVVOZuwIeepv/twlYY3IwCW8ZSjRVeB2QMdW+dlfNL/lWP1cv 1CUVFaJjHco4nxSc/brVOrtFxd6d8aJBCPP3gxW0A95EuQn5tXUFGnW/HExDrBg7X/qW Meyb6KpSxsvMYbQ7ksfSzajuQBzcWY/EVqoJ1PbSM+UyFW+cB9W7xGBgZEslStdY76L3 YF+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8LOpaT2Q971EUbjBeeWliYNilDBmmPl4LkCkk2UWfDk=; b=wJ+euSKudjcDC6U74f23SkgM4BZGZ6OFL/Ir5IBUCZoVbMkAaXRnYYfSdy5uYkWya0 ZBMYfzYBSDTZ4pqvnnqMiTgYfDz23WBDNgZdEwzWHmxNK2TA/uj1kISUm3oJUjr06u98 97V8UqulMq578PeHK7Nmutpu8UXpxuO1mSWnRCNRaH8w6Wyn3X0e/xvxLJabTG0gDyCV qXfaYt7cZML7Rd7+2DqmYfESuDrq9P/o/zfnjJVTWewYm6xh8/aPa6Vs9Q+F9OZUzv/V WSYO8jLvKQ40DmdGOjOH8buCuTSKPXjJx6woDCLSJmpQOciiQk7EY6wAhqogWC5mjoTS jB3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pGEsQUri; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb2-20020a1709077e8200b0072b9b9820afsi10190196ejc.845.2022.08.22.12.44.35; Mon, 22 Aug 2022 12:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pGEsQUri; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238552AbiHVTfE (ORCPT + 99 others); Mon, 22 Aug 2022 15:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbiHVTfC (ORCPT ); Mon, 22 Aug 2022 15:35:02 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56911BE1; Mon, 22 Aug 2022 12:35:01 -0700 (PDT) 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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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