From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6659A379EEA for ; Tue, 7 Apr 2026 20:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775594148; cv=none; b=fSsAW5bAht+z0w0pzpxxwYgbt1GZPz0+SqXqoU9YBSLyoVm1UPFnmQ3GnuTzIkf0t5jCimyiT5H8lyFRQtPY20d9xGzh7bQSh+hLIrr7+pOzCLBVPcsNwVbflrhDR9RSB0e4LI2/dbzKf0oy/LdCwF8M42uYZ4bvtaFO4BRT8lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775594148; c=relaxed/simple; bh=uc19Ba/ATTX8G07ytQTJT9yWA1+whtmmHTFPlfDal2o=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=G7wbKMpV+UEVzcFOTxNRK/xUR42Q5qg0SgE5jn9rWMJKNk6aPomT6ZMScf4ZvStlbwkkNLH1u/RNDNOrV15i/VN5bqKe16K0sL3nMrhQ8APkXLT1vrqIENGF/vg5IPXK9NHjZoCShdHSG3R/5POmEg/XLktM8a48Cxb3l1XOubY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nui4s4m0; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nui4s4m0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775594147; x=1807130147; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=uc19Ba/ATTX8G07ytQTJT9yWA1+whtmmHTFPlfDal2o=; b=nui4s4m0n6Gzxio0jLrlMVUu/XMrwmF1MFgTV3IjgKc3gwu1d2MjZkIr bmmnr1SBPMN1uSc2jcK6W0qR2+9nobuh1Pt/ePqwB1wFBoNXJvRZJxQt4 ZLrSqnqlLPMI/kHl/GJU5StvVx0bh0BaqxTZqlDPPo6kj3DdMXBSdZTIZ 6bXtca5J/dffspNtg//ttzCXXfC2H86b5P5hIwPvD0BoxP36Wi0x/Rg3c uCitucoG83Q2Gq7CmDG5DVy+pmPUoatylP5YTPrkPB6aQ1wJ7LBUgfZCa pGuK0WGe7pZze3Fr7+ciQqJLoRLuyokmTPZxot4uryX0/Br8sNkKhwCPb g==; X-CSE-ConnectionGUID: bJHdOA8GRE2KWOWK7ESDVA== X-CSE-MsgGUID: aeqxwqZNR92DPNFn8vfneA== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="76688864" X-IronPort-AV: E=Sophos;i="6.23,166,1770624000"; d="scan'208";a="76688864" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2026 13:35:47 -0700 X-CSE-ConnectionGUID: 2AzOh+utQk62wFXlSbJ5sg== X-CSE-MsgGUID: dufHfjTBQFewJITpZ2UFvQ== X-ExtLoop1: 1 Received: from unknown (HELO [10.241.243.39]) ([10.241.243.39]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2026 13:35:47 -0700 Message-ID: <1c742a1d8ecd8e314d704d46a44e2b8893479e50.camel@linux.intel.com> Subject: Re: [PATCH v2 4/4] sched/rt: Split cpupri_vec->cpumask to per NUMA node to reduce contention From: Tim Chen To: "Chen, Yu C" , K Prateek Nayak , Peter Zijlstra Cc: Pan Deng , mingo@kernel.org, linux-kernel@vger.kernel.org, tianyou.li@intel.com Date: Tue, 07 Apr 2026 13:35:46 -0700 In-Reply-To: <3b66e8e8-07e0-4f3e-a3ba-d97133af5162@intel.com> References: <20260320124003.GU3738786@noisy.programming.kicks-ass.net> <63a095f02428700a7ff2623b8ea81e524a406834.camel@linux.intel.com> <20260324120008.GB3738010@noisy.programming.kicks-ass.net> <138c3f9d-309f-41e6-aa72-a3f6bd713bf0@intel.com> <22072ef8-5aec-49ac-9cc4-8a80bec14261@amd.com> <64649c85-29ab-4f70-a0c4-3c83cbdae2fc@intel.com> <20260402105530.GA3738786@noisy.programming.kicks-ass.net> <93d7eb33-c3a5-4498-bc26-57806b73d9e0@amd.com> <3b66e8e8-07e0-4f3e-a3ba-d97133af5162@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.1 (3.58.1-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2026-04-03 at 13:46 +0800, Chen, Yu C wrote: > On 4/2/2026 7:06 PM, K Prateek Nayak wrote: > > Hello Peter, > >=20 > > On 4/2/2026 4:25 PM, Peter Zijlstra wrote: > > > On Thu, Apr 02, 2026 at 10:11:11AM +0530, K Prateek Nayak wrote: > > >=20 > > > > It is still not super clear to me how the logic deals with more tha= n > > > > 128CPUs in a DIE domain because that'll need more than the u64 but > > > > sbm_find_next_bit() simply does: > > > >=20 > > > > tmp =3D leaf->bitmap & mask; /* All are u64 */ > > > >=20 > > > > expecting just the u64 bitmap to represent all the CPUs in the leaf= . > > > >=20 > > > > If we have, say 256 CPUs per DIE, we get shift(7) and arch_sbm_mask > > > > as 7f (127) which allows a leaf to more than 64 CPUs but we are > > > > using the "u64 bitmap" directly and not: > > > >=20 > > > > find_next_bit(bitmap, arch_sbm_mask) > > > >=20 > > > > Am I missing something here? > > >=20 > > > Nope. That logic just isn't there, that was left as an exercise to th= e > > > reader :-) > >=20 > > Ack! Let me go fiddle with that. > >=20 >=20 > Nice catch. I hadn't noticed this since we have fewer than > 64 CPUs per die. Please feel free to send patches to me when > they're available. >=20 > And regarding your other question about the calculation of arch_sbm_shift= , > I'm trying to understand why there is a subtraction of 1, should it be: > - arch_sbm_shift =3D x86_topo_system.dom_shifts[TOPO_DIE_DOMAIN] - = 1; > + arch_sbm_shift =3D x86_topo_system.dom_shifts[TOPO_DIE_DOMAIN - 1= ]; Perhaps something like arch_sbm_shift =3D min(sizeof(unsigned long), topology_get_domain_shift(TOPO_TILE_DOMAIN)); to take care of both AMD system and the 64 bit leaf bitmask limit? Tim > ? > Are we trying to filer the raw global unique die id? - similar to=20 > topo_apicid() > which mask the lower x86_topo_system.dom_shifts[dom - 1]). >=20 > With above change I can get a correct value of leaves (4) rather than (2)= in > the original version. >=20 > thanks, > Chenyu >=20 >=20