Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17876721rwd; Tue, 27 Jun 2023 08:36:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69OjN71HvfrBE36aOe7caMNtXGeaFqiJuBGHpvMXCAuZUwc2yqAhBgPGmFCeOqcSxwsvG8 X-Received: by 2002:a05:6a00:2405:b0:641:d9b:a444 with SMTP id z5-20020a056a00240500b006410d9ba444mr31722764pfh.31.1687880184649; Tue, 27 Jun 2023 08:36:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687880184; cv=pass; d=google.com; s=arc-20160816; b=EzYoppOKiTxLIPO5ftq5VuwoicCW6+ZZ9h8ZOVaiebuHanm06F8RIS3/06/P43oVjI uYhXWjKFgfXqCk1QVCFPBBpLiTwd3qclwGAUMx9oqzK3To0dGvvEHvM655pj3TjcOkH3 VIlCCRtmCvHCmKL5+UmMxs+V4skw8BfGdypRtt4CqiXpNJgpHBQin/sZ/vHT20tO9erf P/bLwezgxpQrwXyX1rkd5jwCkSNgCqc+Tvx5pEmqjmLSrCagilDaffoI4IB8jjDqPFtr FT6o+MG2Mg13Wl1fCo/huvUifc2EtEWWPOs/w51c1U22ioJoHSm5ZGit20fkEwKnE+fR ko9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=0V/fhjwhAb8hUkBGKT5x20wvQoyj6f3GoMLCdY5UuRw=; fh=pgsDVpQUIuariHC8xSBJGNM8tq2AkvMIqkmpHorjphc=; b=lo0sNOfh9IDRljrqTL6oG/bjsUcO2e1bQhJSjEgXVhkuCwPyt9Ba+lUC88M7jX5u3O DUDxpH8DOLDgP9gW63EpZ5Bw/CIG/7OQ2jkHkaH4Ms8WfiDkLhJhxKrCdaO4wObvTWLo M1MOAO+VMmU2Xsvn5NU1s7JBLxg0GuDJvRvGx92Cfddhiz2etRO7J3ouTtuI7tLXEu1Q 1I4P29dKWeDvC9gT7Kx+lmv0oMXVlbwwlHJYXAmTZ9haTNENajAS4Whez/EZhs9FmGfX SlhICY2Tt8+xW5cQhFEqQq4LfrAaPW+TJaeVWeEiyyQnbZ4wjBPLIMFZafvkCCY4ENnp 4Clw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=blQ9NBki; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce12-20020a056a002a0c00b0066215192dd4si6861170pfb.295.2023.06.27.08.35.59; Tue, 27 Jun 2023 08:36:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=blQ9NBki; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbjF0Oz6 (ORCPT + 99 others); Tue, 27 Jun 2023 10:55:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbjF0Oyi (ORCPT ); Tue, 27 Jun 2023 10:54:38 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCFF35BD for ; Tue, 27 Jun 2023 07:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687877576; x=1719413576; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mkfhtreuxusToFgvxOpU2UjVZfPct2x3MDn6fs/kkfI=; b=blQ9NBkiYj0ECOXXstL3mMERLHViAetDVERyC3Ds5q01SP3OEXjvOjec lTWKtKrfvKc9VY3apI+PsfL3SoNfVWQPQ+5aK3c6Flim7bhzGJC24qLnF GU0I4XOe7fPYivSId9nWaxJ33Yh9tp7qUfANZ3JbT47l9LowAOwkweuuf IUBDQTrEv4FdBI7sQ0/QvRDaoTAg+oWFXi5CC22dfhQk8TWGPn+Bfj5Si ksJOlusTnwGGP33VdkV4COXYPXAVuV/8KX7JG0wCTsIPRxAXPJ2KdeMig Y4bvJxi63lMNsq8qW9bucA7zZPdPKGChnnP3GweBIYUhBwHI9QjxXgg+M g==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="447974377" X-IronPort-AV: E=Sophos;i="6.01,162,1684825200"; d="scan'208";a="447974377" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 07:52:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="751756094" X-IronPort-AV: E=Sophos;i="6.01,162,1684825200"; d="scan'208";a="751756094" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP; 27 Jun 2023 07:52:53 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 27 Jun 2023 07:52:53 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Tue, 27 Jun 2023 07:52:53 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 27 Jun 2023 07:52:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l8BiQgwacBd/Skxx4fMLtcMQm19eVCtMD86cMQOJrIHps3jTvgWxti3txaoJKXlXJ0rNFzColDh9EReqB2dJmIeNbcqZq8ADSZGSYnzkqpbzsVEkouzzV5LH24pZC1TQGGXsMbaVOIf3YPnaIWHVIvouZo5DNWAmK6lktkejjZJTTxKuI/I5h6f9rwthXFV1+mlZbqzpm6DbKUj7+hEjpSR3KECcwv/nh5qZ3Ese0jL+BzvvUPJMUNT8VChSaBoRUYNRfgQRxUC2T342TmnNVmryaYl1e8wRakIb+4Xkai2YiyC+l0GlkjpB/1Oi726A0F22G4f0sSanJYf65RZO9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0V/fhjwhAb8hUkBGKT5x20wvQoyj6f3GoMLCdY5UuRw=; b=gFg1yH8ZMycdb8IZQmhqaG6P3t4Yu9pCjrv4sM8lhlh5hskuJNbYUi47HfUqdzj4b4Y/IOZTGw2688YDmO0NyCzGakluk4P/NIZH9PAJspqbIY0qdu47w2tazJVEuUNDxMRmO6PpeRIYvuWriedk6YTsT5FxqRZuf3fvKB8x5DWmtNo13gUsDKEkI8voIrfp7/P4hjb4pzZldX3u+A6actHz9y9dRXKovycQz8gN/oca+MIrCKN4o4y+NvYRQv57VawS8HKkdnLv+Rs8pQ2ZxVeEKuqvKPtjtuxN/oaiWKMaK2FSFXytrvGDeYfZ27fqOKj5qvQa3R/cYhYODSfceQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3260.namprd11.prod.outlook.com (2603:10b6:5:b::30) by SA1PR11MB6919.namprd11.prod.outlook.com (2603:10b6:806:2bc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Tue, 27 Jun 2023 14:52:51 +0000 Received: from DM6PR11MB3260.namprd11.prod.outlook.com ([fe80::9aea:5d4e:5008:a155]) by DM6PR11MB3260.namprd11.prod.outlook.com ([fe80::9aea:5d4e:5008:a155%7]) with mapi id 15.20.6521.024; Tue, 27 Jun 2023 14:52:50 +0000 From: "Deng, Pan" To: "Chen, Yu C" , Tim Chen CC: "Lu, Aaron" , Peter Zijlstra , Vincent Guittot , Ingo Molnar , Juri Lelli , "Chen, Tim C" , "linux-kernel@vger.kernel.org" , "Li, Tianyou" , "Ma, Yu" , "Zhu, Lipeng" Subject: RE: [PATCH v2] sched/task_group: Re-layout structure to reduce false sharing Thread-Topic: [PATCH v2] sched/task_group: Re-layout structure to reduce false sharing Thread-Index: AQHZpBf8y9gtMyr/606YJQEIlMf8Fa+cm1MAgAAivoCAAJuXAIAA+yqAgABvq/A= Date: Tue, 27 Jun 2023 14:52:50 +0000 Message-ID: References: <20230621081425.420607-1-pan.deng@intel.com> <20230626054756.GA435374@ziqianlu-dell> <0a611696cbc63a3a9b99a7966b8fe4f7e20a014b.camel@linux.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB3260:EE_|SA1PR11MB6919:EE_ x-ms-office365-filtering-correlation-id: 99356a5f-ae0a-40de-2d49-08db771e2dc2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1IGQSCmHsjRxqyesq3C0I/6P7+STsrWI2YyRrP1koMKyMoRj03uNoWPCXQ3SKbuw/AUACCe+IrWzNdcYxery/cRPpauhIY/+aUBEF5qzc3mQiUCKqDpuW1Ao5CKAhYhbV2/PMmb2jtRzoY1AkO6cmqWlgPIjA0dT32icgw0OGRDhofaziZ2iD3GOJgNeVfUQ8+aXrFQbQAPfPWlwXPXmn8SxwRC6/lDqNnatI+CTr+iPN9C+sj8gp5D2yuM1c1kee8GkpwbIG0s3ty3oNv7zRSEce+6+aQaTruVnKiciqHF0WuJkccNjszyWB3qlWnX0ifb0brby0K9cr9XyjiMiKsWe6RyCZJk3GQT29wC89xMqiePY36/10e8N1ZjwvvG/WEaPydWivGZtupnwjTM0ZtpnPtnw0/O4AB0taOofXoiWVC6ftVNQpLw7TGz5vwDlHBqOZpFQFodoobzYhfdcg1h9TRK8LrQZSotvU6p6VSqoAx/wq2O92RV46IXitef6LKhajyDG24rbDTny80etpNPYezW2Cfrb3an6nizGe1tEA23a3rVaObsp9wEfwXyv+hd4wb15fKPg/mNdc0oCXDhp00hNwvG8iEovT0XJhoinJcotip9969C8yJGHxyH/ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3260.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(39860400002)(366004)(396003)(136003)(346002)(451199021)(54906003)(2906002)(53546011)(9686003)(7696005)(82960400001)(26005)(83380400001)(38100700002)(122000001)(71200400001)(186003)(6506007)(55016003)(41300700001)(110136005)(86362001)(38070700005)(4326008)(478600001)(316002)(76116006)(66556008)(66946007)(66446008)(33656002)(66476007)(64756008)(8936002)(8676002)(5660300002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jA+5xJJ8IslKxEaLAhf+/SxFp5C2p6YsAQ57uQtT2KDcZ82R2r9cFfY1iKJE?= =?us-ascii?Q?4wKRRP4pp7F1DB7/xW207TRtxrlZOlnaXMaLWcVHM4nWRy0mFnZ7vAXRsbJ1?= =?us-ascii?Q?q+ziR45iGXAfEZJwWl7ofySUKTCGx6CrwuM0lVKuU1TV7A+yGQggO+O4HnRF?= =?us-ascii?Q?Ua80aUkv92aU4gSDBpgst7lP2pEKtVI91RPlB5LiEW7MxUGJvRqQtWtmrDDk?= =?us-ascii?Q?jSUYr7ENSaTVXNT2YrR65WjImpKEF6FHF/IIBjv9swU5YxLOeBFKJD34RYvX?= =?us-ascii?Q?l3Q5ylu4kpARBP/QCkjvSgkpwC68BdUDdYgWmbmTM9TOHbGFDY3s7V8Bs5FH?= =?us-ascii?Q?hR+ooUgatxr+FhaVj9qyebiKtnP1vEQ7m0K0H+HUaUN/WuQ+r8JVdh46dHEa?= =?us-ascii?Q?zz852WAREWzLm0S3QFvxVSkTeEBJTc5hxiI7U0WjSfuN47WF9LFVWS0e1XuM?= =?us-ascii?Q?ukYWlPSRVwlMV7jeoVrXnAy0NWc2w/HOz3A1doZshhT4Z+aBn0NeWKF7MZ2j?= =?us-ascii?Q?pxT/f7m0mjqPkA9XXRuZX/XLC6abbAsFSQQ1jIX1f6+Zy7OKfQG7qZQnKZKl?= =?us-ascii?Q?GX0pU+dtG1VGdkPTEOHZswse4UrB/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656bHunVkiGeztoYIN/pJ0qATTawsuwaQdtVb4pw19VkISBCsz4?= =?us-ascii?Q?GzcYbft43hy1smwCkco=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3260.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99356a5f-ae0a-40de-2d49-08db771e2dc2 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2023 14:52:50.3314 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Mw/6kHEM3880pDDF5Qd+qFNvGQP3/6zPV3iuxzhelPSIiWRBZZ9XGCaaghcijw4bFRLjGPTqg+CfHigyaObOeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6919 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Chen, Yu C > Sent: Tuesday, June 27, 2023 4:08 PM > To: Tim Chen > Cc: Lu, Aaron ; Peter Zijlstra = ; > Vincent Guittot ; Ingo Molnar > ; Juri Lelli ; Deng, Pan > ; Chen, Tim C ; linux- > kernel@vger.kernel.org; Li, Tianyou ; Ma, Yu > ; Zhu, Lipeng > Subject: Re: [PATCH v2] sched/task_group: Re-layout structure to reduce > false sharing >=20 > On 2023-06-26 at 10:09:10 -0700, Tim Chen wrote: > > On Mon, 2023-06-26 at 15:52 +0800, Chen Yu wrote: > > > > > > > > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index > > > ec7b3e0a2b20..067f1310bad2 100644 > > > --- a/kernel/sched/sched.h > > > +++ b/kernel/sched/sched.h > > > @@ -1958,8 +1958,10 @@ static inline void set_task_rq(struct > > > task_struct *p, unsigned int cpu) #endif > > > > > > #ifdef CONFIG_RT_GROUP_SCHED > > > - p->rt.rt_rq =3D tg->rt_rq[cpu]; > > > - p->rt.parent =3D tg->rt_se[cpu]; > > > + if (p->sched_class =3D &rt_sched_class) { > > > + p->rt.rt_rq =3D tg->rt_rq[cpu]; > > > + p->rt.parent =3D tg->rt_se[cpu]; > > > + } > > > > If we avoid the assignment for non-rt task, do you see it further > > improves c2c bounce? > > > I did not see noticeable extra throughput improvement from netperf, with > above change + Aaron's fix + Pan's cacheline alignment adjustment. Echo Yu. Cacheline alignment adjustment resolved set_task_rq c2c bounce with load_av= g, The remained cycles of "assignment for non-rt task" is little according to = perf record data, the should be the reason of no extra throughput improvement. Thanks Pan=20 >=20 > thanks, > Chenyu