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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E0F1C433DB for ; Wed, 6 Jan 2021 04:45:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BBDF22D01 for ; Wed, 6 Jan 2021 04:45:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BBDF22D01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D101C8D00E9; Tue, 5 Jan 2021 23:45:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C99FB8D0090; Tue, 5 Jan 2021 23:45:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B60628D00E9; Tue, 5 Jan 2021 23:45:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id 9A4AB8D0090 for ; Tue, 5 Jan 2021 23:45:57 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5B280180AD815 for ; Wed, 6 Jan 2021 04:45:57 +0000 (UTC) X-FDA: 77674112754.26.pen45_3310528274de Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 397D01804B660 for ; Wed, 6 Jan 2021 04:45:57 +0000 (UTC) X-HE-Tag: pen45_3310528274de X-Filterd-Recvd-Size: 3372 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Wed, 6 Jan 2021 04:45:55 +0000 (UTC) IronPort-SDR: oQfZJQLg0MTRf7eBFQcI2H6PE6vnAgcvgjAz06T6ghSSqGAlvys5ZzCf+Yp5M3vFeBiPy3bP0b oF2fgLT7bi4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9855"; a="177327422" X-IronPort-AV: E=Sophos;i="5.78,479,1599548400"; d="scan'208";a="177327422" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 20:45:54 -0800 IronPort-SDR: 1dFXjE8Uz9vBuNBcfiNT3fvqJvx8WsbzyCNMuMOHgCYhpf3S32eKLMrH0nyGVu2Kq14rlNSyk0 +hn6t/PQBBDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,479,1599548400"; d="scan'208";a="398088495" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.147.98]) by fmsmga002.fm.intel.com with ESMTP; 05 Jan 2021 20:45:50 -0800 Date: Wed, 6 Jan 2021 12:45:50 +0800 From: Feng Tang To: Chris Down , Roman Gushchin Cc: Shakeel Butt , Andrew Morton , Michal Hocko , Johannes Weiner , Vladimir Davydov , Linux MM , LKML , andi.kleen@intel.com, "Chen, Tim C" , Dave Hansen , Huang Ying Subject: Re: [PATCH 2/2] mm: memcg: add a new MEMCG_UPDATE_BATCH Message-ID: <20210106044550.GA3184@shbuild999.sh.intel.com> References: <1609252514-27795-1-git-send-email-feng.tang@intel.com> <1609252514-27795-2-git-send-email-feng.tang@intel.com> <20210106021213.GD101866@shbuild999.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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: Hi Chris, On Wed, Jan 06, 2021 at 03:43:36AM +0000, Chris Down wrote: > Feng Tang writes: > >One further thought is, there are quite some "BATCH" number in > >kernel for perf-cpu/global data updating, maybe we can add a > >global flag 'sysctl_need_accurate_stats' for > > if (sysctl_need_accurate_stats) > > batch = SMALLER_BATCH > > else > > batch = BIGGER_BATCH > > Moving decisions like this to the system administrator is not really a > solution to the problem -- inclusion should at least be contingent on either > having "correct-ish" stats exported to userspace. Displaying broken stats to > the user -- even with a configuration knob -- is less than ideal and is > likely to confuse and confound issues in future. > > I would also like to see numbers from more real-world workloads. Sure. Roman also mentioned this. Do you have some suggestions for the workload or benchmarks? I don't have much knowledge on this, and have only leveraged some of 0day's benchmarking systems. Thanks, Feng > MEMCG_CHARGE_BATCH is certainly fairly arbitrary as-is, but if it is going > to be changed, the reason for that change and its implications (positive and > negative) for real-world workloads must be well understood, and I'm not sure > we're there yet.