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=-2.5 required=3.0 tests=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 9F51FC4360C for ; Fri, 4 Oct 2019 12:33:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F35C222C0 for ; Fri, 4 Oct 2019 12:33:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F35C222C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1973E6B0003; Fri, 4 Oct 2019 08:33:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 147726B0005; Fri, 4 Oct 2019 08:33:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 084848E0003; Fri, 4 Oct 2019 08:33:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id DC5E96B0003 for ; Fri, 4 Oct 2019 08:33:52 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 8799B9085 for ; Fri, 4 Oct 2019 12:33:52 +0000 (UTC) X-FDA: 76006043904.28.chair49_3ee6ff865a429 X-HE-Tag: chair49_3ee6ff865a429 X-Filterd-Recvd-Size: 2967 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 12:33:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 78C55B052; Fri, 4 Oct 2019 12:33:50 +0000 (UTC) Date: Fri, 4 Oct 2019 14:33:49 +0200 From: Michal Hocko To: Daniel Colascione Cc: Qian Cai , Tim Murray , Suren Baghdasaryan , linux-mm@vger.kernel.org, linux-kernel , linux-mm Subject: Re: [PATCH] Make SPLIT_RSS_COUNTING configurable Message-ID: <20191004123349.GB10845@dhcp22.suse.cz> References: <1C584B5C-E04E-4B04-A3B5-4DC8E5E67366@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed 02-10-19 19:08:16, Daniel Colascione wrote: > On Wed, Oct 2, 2019 at 6:56 PM Qian Cai wrote: > > > On Oct 2, 2019, at 4:29 PM, Daniel Colascione wrote: > > > > > > Adding the correct linux-mm address. > > > > > > > > >> +config SPLIT_RSS_COUNTING > > >> + bool "Per-thread mm counter caching" > > >> + depends on MMU > > >> + default y if NR_CPUS >= SPLIT_PTLOCK_CPUS > > >> + help > > >> + Cache mm counter updates in thread structures and > > >> + flush them to visible per-process statistics in batches. > > >> + Say Y here to slightly reduce cache contention in processes > > >> + with many threads at the expense of decreasing the accuracy > > >> + of memory statistics in /proc. > > >> + > > >> endmenu > > > > All those vague words are going to make developers almost impossible to decide the right selection here. It sounds like we should kill SPLIT_RSS_COUNTING at all to simplify the code as the benefit is so small vs the side-effect? > > Killing SPLIT_RSS_COUNTING would be my first choice; IME, on mobile > and a basic desktop, it doesn't make a difference. I figured making it > a knob would help allay concerns about the performance impact in more > extreme configurations. I do agree with Qian. Either it is really helpful (is it? probably on the number of cpus) and it should be auto-enabled or it should be dropped altogether. You cannot really expect people know how to enable this without a deep understanding of the MM internals. Not to mention all those users using distro kernels/configs. A config option sounds like a bad way forward. -- Michal Hocko SUSE Labs