Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp304144pxu; Thu, 15 Oct 2020 04:33:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0e02lgcMg/npijmKT104jqPG/1EopjJNhR4ZlQ3mxFZJPCYD7xbsHevQObJEs0gOf2icN X-Received: by 2002:a05:6402:b0e:: with SMTP id bm14mr3806862edb.19.1602761592138; Thu, 15 Oct 2020 04:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602761592; cv=none; d=google.com; s=arc-20160816; b=s0apEG5WX3f9Oh5pzxlAJBE+We328cVvMUp+ZAcI3VNYbuLWcuRgG4qtkgdKhNuUe3 +boR8gWl6Dw4FhPrJ+YxFiVvF6S8qT4wDlU0ubX9yaLEk7kvDe/K/JTLCSPRQe0Uugz9 e61mH9Abaq8sBOuC6DNyhpgtdx0Lvy6t/fLPvgx0U7H+VJCqLiPHDC+u//e+Dq3fNxuC ZChz/D88Dfr6fOAepM70R4+9NNLpIEmUGFsVjHYE2ci0VWStVjY2moSHaqUg30p5autd GmjQwab2RY0WCHS4CLTgCsCWf2woBGQIM0FoFrygSYIFpe6zzNNMvRc8A+41sNFIirJk gmqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KceBOO9nMjED6HpujLDU1fs1DUdP5978Vr/C9JUseNM=; b=ydfXNUGkTiNwyLglvHHIA1U2EM94QF90GsXWkQsX/iW+O+ArBtUtZj+z2PuBiON/I7 iSVE5HpshTDBHH3ITsK/D3utMti1aGzCZzz7/wOiJAffU9KWB6P5AV2ACfLE7+OFeb+J jy6zWwfoV2kuPIppsKMcFOax7G0iyulm9Btq1y5KwG4BJNGV3w2Y9SBAacV9EPIyxUc6 3yvG6gpKj+doe9ManUn/0n95GyUWxCBIoPd3+yLYwCU/OBSOJBVCIclPu+sR9mkt5oEF n4qFijAHtESIJNZm/kVqDHQa3MRbA8s/XxmEKwfpXRJmdmvnd1Nt+CQl9Y3Dgk4+ix6K 954w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si1913530ejm.549.2020.10.15.04.32.48; Thu, 15 Oct 2020 04:33:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388661AbgJOJIq (ORCPT + 99 others); Thu, 15 Oct 2020 05:08:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:50568 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgJOJIp (ORCPT ); Thu, 15 Oct 2020 05:08:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2E5BCACC2; Thu, 15 Oct 2020 09:08:44 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id CE38A1E1338; Thu, 15 Oct 2020 11:08:43 +0200 (CEST) Date: Thu, 15 Oct 2020 11:08:43 +0200 From: Jan Kara To: NeilBrown Cc: Jan Kara , kernel test robot , Linus Torvalds , Andrew Morton , Christoph Hellwig , Trond Myklebust , Chuck Lever , LKML , lkp@lists.01.org, lkp@intel.com, ying.huang@intel.com, feng.tang@intel.com, zhengjun.xing@intel.com Subject: Re: [mm/writeback] 8d92890bd6: will-it-scale.per_process_ops -15.3% regression Message-ID: <20201015090843.GA7037@quack2.suse.cz> References: <20201014084706.GB11647@shao2-debian> <20201014101904.GA11144@quack2.suse.cz> <87pn5kfply.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn5kfply.fsf@notabene.neil.brown.name> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 15-10-20 08:46:01, NeilBrown wrote: > On Wed, Oct 14 2020, Jan Kara wrote: > > > On Wed 14-10-20 16:47:06, kernel test robot wrote: > >> Greeting, > >> > >> FYI, we noticed a -15.3% regression of will-it-scale.per_process_ops due > >> to commit: > >> > >> commit: 8d92890bd6b8502d6aee4b37430ae6444ade7a8c ("mm/writeback: discard > >> NR_UNSTABLE_NFS, use NR_WRITEBACK instead") > >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > Thanks for report but it doesn't quite make sense to me. If we omit > > reporting & NFS changes in that commit (which is code not excercised by > > this benchmark), what remains are changes like: > > > > nr_pages += node_page_state(pgdat, NR_FILE_DIRTY); > > - nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS); > > nr_pages += node_page_state(pgdat, NR_WRITEBACK); > > ... > > - nr_reclaimable = global_node_page_state(NR_FILE_DIRTY) + > > - global_node_page_state(NR_UNSTABLE_NFS); > > + nr_reclaimable = global_node_page_state(NR_FILE_DIRTY); > > ... > > - gdtc->dirty = global_node_page_state(NR_FILE_DIRTY) + > > - global_node_page_state(NR_UNSTABLE_NFS); > > + gdtc->dirty = global_node_page_state(NR_FILE_DIRTY); > > > > So if there's any negative performance impact of these changes, they're > > likely due to code alignment changes or something like that... So I don't > > think there's much to do here since optimal code alignment is highly specific > > to a particular CPU etc. > > I agree, it seems odd. > > Removing NR_UNSTABLE_NFS from enum node_stat_item would renumber all the > following value and would, I think, change NR_DIRTIED from 32 to 31. > Might that move something to a different cache line and change some > contention? Interesting theory, it could be possible. > That would be easy enough to test: just re-add NR_UNSTABLE_NFS. Yeah, easy enough to test. Patch for this is attached. 0-day people, can you check whether applying this patch changes anything in your perf numbers? > I have no experience reading will-it-scale results, but 15% does seem > like a lot. Well, will-it-scale is a micro-benchmark that usually runs in extremely parallel loads so 15% can be caused by fairly obscure issues like different code alignment of a hot loop, slightly different cache line sharing, or so... Honza -- Jan Kara SUSE Labs, CR