Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp337417ybv; Sat, 22 Feb 2020 04:44:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwJupkCMQnvzyLc4cR7R+zlz5eE1BEJWZoDGu+3kvStbH2VP108OHtNZ35f62k3ysr+9Ons X-Received: by 2002:aca:fcc1:: with SMTP id a184mr5926840oii.36.1582375491744; Sat, 22 Feb 2020 04:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582375491; cv=none; d=google.com; s=arc-20160816; b=rd6WmCgZUMs05Pu3YsOZmZL/Ixk+ty4WUhpRv6pU9gG35KNRKU8xqpBt54oUVSZIuh bb/RBR/6i5G8slCMmxgYNbPGG8R6XYWsyrDaOvDiW4QmEHdgp68af71Ukie35hhzlR1m ha797zUOH+YQ414uefEMF1U3TCFZesECrWOmzrAwFrMbCRUo1FZj5+Neqmy4eRdcrtTu KHBNCb8e6cTI76CaWKZtV+PQNtWrbcodtmS0FWCqtw11TxbcuIoVsKUyfLvE66ETjjzi 6INXw1k35oLpY3ZiOmPt0syrKn6oRUDd+vJoMlBjE2gUVJOYs4LQvR9OhaFr29V/l4of HXPw== 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=dFqjZtG1usb4T4Oe5H8xY06MPVeZdwsodaDmAwBkScE=; b=1J8p34G2iAM00LCOY6IHVIODhbOMylb1SuVBNbcTqR8fykJk0KPB93UNHD8UamqrCg QyLAvyeLpMg8JWFXeyUNywAhj3nygaj26faLDEcbNFsopRWPTxV+YcmlvH7gZBQ/wk9G DBPdQBhx64E2H8TB3stSF9dzJ2y8Dv3Kpy6USC0MTwcC5Ygend65jgDdDslLU2fgDEu/ AJrLc2KnF8yPSdgA0MwqjLkXvVAGGmVzo9gJt3Q1fkVpEGV8J8Jp+9UcKffLywZYANjT QRkDayhhRDpKwpSDx11Ou4dOXXRls7ODeiNuf17oGOS22l2rAUgC+cck1bFTI9h2Kz+4 YRCg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si3234434otf.143.2020.02.22.04.44.39; Sat, 22 Feb 2020 04:44:51 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727184AbgBVMoF (ORCPT + 99 others); Sat, 22 Feb 2020 07:44:05 -0500 Received: from mga06.intel.com ([134.134.136.31]:54138 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbgBVMoF (ORCPT ); Sat, 22 Feb 2020 07:44:05 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2020 04:44:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,471,1574150400"; d="scan'208";a="255104506" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.147.113]) by orsmga002.jf.intel.com with ESMTP; 22 Feb 2020 04:44:00 -0800 Date: Sat, 22 Feb 2020 20:43:59 +0800 From: Feng Tang To: "Kleen, Andi" Cc: Peter Zijlstra , "Chen, Rong A" , Jiri Olsa , Ingo Molnar , Vince Weaver , Jiri Olsa , Alexander Shishkin , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , Linus Torvalds , "Naveen N. Rao" , Ravi Bangoria , Stephane Eranian , Thomas Gleixner , LKML , "lkp@lists.01.org" , "Huang, Ying" Subject: Re: [LKP] Re: [perf/x86] 81ec3f3c4c: will-it-scale.per_process_ops -5.5% regression Message-ID: <20200222124359.GA86836@shbuild999.sh.intel.com> References: <20200205123216.GO12867@shao2-debian> <20200205125804.GM14879@hirez.programming.kicks-ass.net> <20200221080325.GA67807@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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andi, On Sat, Feb 22, 2020 at 02:05:02AM +0800, Kleen, Andi wrote: > > > >So likely, this commit changes the layout of the kernel text > >and data, > > It should be only data here. text changes all the time anyways, > but data tends to be more stable. Yes, I also did en experiment by modifying the gcc option to let all functions address aligned to 32 or 64, and the 5.5% gap still exist for the 2 commmits. > > which may trigger some cacheline level change. From > >the system map of the 2 kernels, a big trunk of symbol's address > >changes which follow the global "pmu", > > I wonder if it's the effect Andrew predicted a long time ago from > using __read_mostly. If all the __read_mostlies are moved somewhere > else the remaining read/write variables will get more sensitive to false sharing. > > A simple experiment would be to add a __cacheline_aligned to align it, > and then add > > ____cacheline_aligned char dummy[0]; > > at the end to pad it to 64bytes. Thanks for the suggestion, I tried this and the 5.5 regrssion is gone! which also confirms the offset for the bulk of stuff following "pmu" causes the performance drop. > > Or hopefully Jiri can figure it out from the C2C data. I'm also trying to debug following Jiri's "perf c2c" suggestion. Thanks, Feng