Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16478463rwd; Mon, 26 Jun 2023 10:30:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43w4F/wOPZJCELtn9dBtGJaYqNcyKmv9lDs//atWW67QtaOaROwTsb+nXPvOk3V6lUeVWJ X-Received: by 2002:a17:906:3153:b0:98d:f4a7:71d1 with SMTP id e19-20020a170906315300b0098df4a771d1mr5371324eje.8.1687800603563; Mon, 26 Jun 2023 10:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687800603; cv=none; d=google.com; s=arc-20160816; b=Fw5ZjXm+n9Ydgf5Wgr/+KB/WnZE+JgwYodG1VV1M0yhm8o00/miwZ1aju0ijDpGCiP ArveVmMh1wAsT7Sh5AYZPlJwmBh7Nu9TgrsXQ33Hqo3dVIlUGb0ange9E8Y1pxsJpZRl x10gVwj+VQLn06wYTPp0t6sRfgUg2RaEEU+f9BR1B7T27oZJuh/m6a2fvJrGSWZ0LSGR cGaE+2f/IqG5hqFlaBQ5hQxkZlnWHfJlq8hc+H6mC7UPUbBjqi2sll3EGA5Sl4hlzmRU bR2KcP3R+3id/zg0a2kwtzgnMq7wVwvmTksaYqIwprqFQX70N8D/ZghT/AQGRiyp/AjO uNfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=NqEPaLcpDI94IuUy2hYI9yNVLVixNX1ckoc2JzCmvws=; fh=0i+QhSf5aZi6McfMZ1sc5FLkojkGRKcJZqD8YN38ANo=; b=TRitbfdInDKHqTbdlzJJ3lwMWU38pON7gIL41ltPdnKkz+buZ7od4Z3vzjmMwHc8/X lxeS2EMkeLujSfXx2Ltvuby3EXO4wxqatcJDxwHUlZWVhvgr7YoIhe+hEqNZK6S34I4n OTiweNbSTD0lBIEycbeTGgpVwIRo3PELfxeljww0fdOzs1PIgLZXjWwkJgq7NSrpKc7t e+Hw/SllfkL7qmuXxBPQ+7LFJWxdnNGsGhOMtaoascQal8+2ZHajTKX/oMmKw9f9GZ+g TZInhglNW47HzfQCBN9i2g8OV6DZAK9aoIu0h/Z5DCQ1eqrwuj26GM8BE5HlY2XU9/Tb Kp/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="UnhAG/nl"; 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 v6-20020a17090606c600b009920612b898si54691ejb.293.2023.06.26.10.29.38; Mon, 26 Jun 2023 10:30:03 -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="UnhAG/nl"; 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 S229629AbjFZRSc (ORCPT + 99 others); Mon, 26 Jun 2023 13:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbjFZRSL (ORCPT ); Mon, 26 Jun 2023 13:18:11 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD162D70 for ; Mon, 26 Jun 2023 10:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687799756; x=1719335756; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=kVVX1jZXw7UiUHNqK+3RXuQGDJL//etFDJear+JO/nM=; b=UnhAG/nlfqJHVYjKFla6r2njO7IGpRP3qUrg+ILN3hVZSEnpCVG0sm8d XGYfkQCchk4/EWbHXE28mfMvA5GvkR5jh2KcBBn17GLfTy34d0OuELQ9M d9SceCoeGe/P4D+EH4TqijCWfA4NR8a/lRGQ7emiBVtHTAtkAOHjRDl6K /VHe9h57IQb5Ctf3iKj157i5bJKPcrffzTT/qA20tbLawlKO+zsNBAoRO X3pY8RgJ7F5ZuABsDtFB1WftFC2Suc0mNR3wHBJBxg4vJdU9vWZKm9eKR W8JxOn1RmiQEtdImPXVbN3vlAz7I7LTd0hQaRz9XJ+ySkXKpStRMFlX2f A==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="351109667" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="351109667" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 10:09:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="710298776" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="710298776" Received: from jingyan2-mobl.amr.corp.intel.com (HELO [10.209.115.106]) ([10.209.115.106]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 10:09:10 -0700 Message-ID: <0a611696cbc63a3a9b99a7966b8fe4f7e20a014b.camel@linux.intel.com> Subject: Re: [PATCH v2] sched/task_group: Re-layout structure to reduce false sharing From: Tim Chen To: Chen Yu , Aaron Lu , Peter Zijlstra , Vincent Guittot , Ingo Molnar , Juri Lelli Cc: Deng Pan , tim.c.chen@intel.com, linux-kernel@vger.kernel.org, tianyou.li@intel.com, yu.ma@intel.com, lipeng.zhu@intel.com Date: Mon, 26 Jun 2023 10:09:10 -0700 In-Reply-To: References: <20230621081425.420607-1-pan.deng@intel.com> <20230626054756.GA435374@ziqianlu-dell> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 On Mon, 2023-06-26 at 15:52 +0800, Chen Yu wrote: >=20 > =20 > 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 > =20 > #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? Tim