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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E20FAC43457 for ; Mon, 12 Oct 2020 15:37:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 53877221FC for ; Mon, 12 Oct 2020 15:37:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="HPI3zdzC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53877221FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D30206B0071; Mon, 12 Oct 2020 11:37:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CDF716B0072; Mon, 12 Oct 2020 11:37:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA7CF6B0073; Mon, 12 Oct 2020 11:37:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 8AD106B0071 for ; Mon, 12 Oct 2020 11:37:53 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1C2148249980 for ; Mon, 12 Oct 2020 15:37:53 +0000 (UTC) X-FDA: 77363678826.18.anger83_0507e69271fb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id DB3BF1015B6CE for ; Mon, 12 Oct 2020 15:33:15 +0000 (UTC) X-HE-Tag: anger83_0507e69271fb X-Filterd-Recvd-Size: 2837 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Mon, 12 Oct 2020 15:33:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1602516794; h=from:from:reply-to:subject:subject: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=73+tM+9Er9hS+F+0/np/PTsoE8sF/xgeY/6dskx2sFA=; b=HPI3zdzCnSq0+ZUYdu8bQMt0Cr0SV9GmvyKA6GeeVczVQyasbY9ALUuN0Yel6mQkrXgrFC ZjnzLr4wJ4IFtg7OwB6j8pKsnO0yR7XYFiQSwqgm0WAmlVc6uI+fDfsKZ47NR+4yuuu68V kr13dMrRtjIo4iW618m6+1GDloNgEqg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4633CB2FA; Mon, 12 Oct 2020 15:33:14 +0000 (UTC) Date: Mon, 12 Oct 2020 17:33:13 +0200 From: Michal Hocko To: Jann Horn Cc: Michael Kerrisk-manpages , linux-man , Linux-MM , Mark Mossberg Subject: Re: [PATCH] proc.5: Document inaccurate RSS due to SPLIT_RSS_COUNTING Message-ID: <20201012153313.GI29725@dhcp22.suse.cz> References: <20201012114940.1317510-1-jannh@google.com> <20201012150738.GF29725@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 12-10-20 17:20:08, Jann Horn wrote: > On Mon, Oct 12, 2020 at 5:07 PM Michal Hocko wrote: > > On Mon 12-10-20 13:49:40, Jann Horn wrote: > > > Since 34e55232e59f7b19050267a05ff1226e5cd122a5 (introduced back in > > > v2.6.34), Linux uses per-thread RSS counters to reduce cache contention on > > > the per-mm counters. With a 4K page size, that means that you can end up > > > with the counters off by up to 252KiB per thread. > > > > Do we actually have any strong case to keep this exception to the > > accounting? > > I have no clue. The concept of "concurrently modified cache lines are > bad" seemed vaguely reasonable to me... but I have no idea how much > impact this actually has on massively multithreaded processes. I do remember some discussion when imprecision turned out to be a real problem (Android?). Anyway, I have to say that 34e55232e59f ("mm: avoid false sharing of mm_counter") sounds quite dubious to me and it begs for re-evaluation. Btw. thanks for trying to document this weird behavior. This is certainly useful but I am suspecting that dropping it might be even better. -- Michal Hocko SUSE Labs