Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp824787ybp; Fri, 4 Oct 2019 05:38:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8h6NtXPMrYco2WHsEKc9bPAmGZZGIvifAGg+qxoNu5hOuMoDdUocG0Ou3x63TIGOtXzJG X-Received: by 2002:a17:906:1c5b:: with SMTP id l27mr12345136ejg.27.1570192722106; Fri, 04 Oct 2019 05:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570192722; cv=none; d=google.com; s=arc-20160816; b=X8k46Bb5cnyy4sbSrMlmtVef/ypKD2RgLqRlRVZq07jn/bqInNYY81WbzQjF2X05j8 qdKSHeXAhNzJ/hDc1IFHorIVXLA2jexTcunuoOCyym8rhuDLFzaMsq/6msx4Ru8Yhwo0 /g6JQ0xFaBbiSmbi8Wd1A12Yl+vQ6ys90czn1ATrM1x8LP3ZeoBvBOUu4DuUNOx53ZZy v9434joo4l0IGqOr8dj6cZRvcZLPejFFgryMVE3KhmP6VPP4rXl/Oo5slSqw9azr63zL mYjaGpEh0810qsgztOZ9qLNyiOIGD+X+Q8VVS2eqYBmN0WUPs5po2d8vc7Ns0SWBs1V6 ewmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m/EKduK6MDjz7qjWCd0QWKNpsR6ZJ+cexh4PciBD/VM=; b=gAnPcrnVGsVmi6ORz0zIFKTIjq6WnujoHnU+xwpP6IjhM/gagYU4VS+iajz/JJWRF2 Pb1PTaT/r8Br2eqs3uFRG9H3tpPsnP/gV5ILe84TIpAzD+i+259S5T4O1zBPuR/dQrOA wKqGkBbj30NwavC10pz9Y1UL9enRMTCKsd/wsYf4KVDbQZ0H1LGtlSufl9LguJikFuCT Rpa4VbotwqKXbIKSQZg4PClBkSAP4K7nTzTzmaUBkVHxaR0ExFybWfkECwGHL2rjlye6 +lg7Bmq92FG7McVHS6zjQpzcZUZAhzXVAaI49GFOHorP6fZgxVZqhZPGYSVJeTp0Nh0y BOaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id br24si2895081ejb.101.2019.10.04.05.38.17; Fri, 04 Oct 2019 05:38:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730817AbfJDMdw (ORCPT + 99 others); Fri, 4 Oct 2019 08:33:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:57964 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726024AbfJDMdw (ORCPT ); Fri, 4 Oct 2019 08:33:52 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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