From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 0EBAA19F40B for ; Sat, 10 Jan 2026 02:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768011889; cv=none; b=G+16fu91omfngewkwu+ak5zgUKSZ/F46snanmur3s8G/6ZduqxkES+g2/dyy1ZyF6ydx+Zbcyc2t5qMaiImqqJ4TurzqW806Q4E8GKAhG5zOFmusBiJlei12c10WyzCXRlBJqd53tDYKKSTVZloLetIx/M4UV1jiHkgj9oMk9h0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768011889; c=relaxed/simple; bh=ixNZjjEUaJINHv3JYWqJ9ZgaW1sjiouJrL6fSXzxCxo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FvZZz4nb42DsX6rkHeZvRtjQPraGXoFxgbDI9rdU/cwiZ4miQA1IPYr35TGpI09bXWhxY/iZBSFZoQfkyqff7RlhKrIB31r+08dpuEMT+C6CfHlrp6tjTGowacxGm8FzOKr0kkaJyfnAgDIAYxkmFL0Vsq1d1aS/ep32j3opYZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BtyZ0fmU; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BtyZ0fmU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768011886; x=1799547886; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ixNZjjEUaJINHv3JYWqJ9ZgaW1sjiouJrL6fSXzxCxo=; b=BtyZ0fmUwoFNvkLPiHLWlgx8qsRO+DHdju9NUGRZeJbn6mwlsfnRDGHg 0pspimlN1IwoXGGreC/+/PB/BZGzXx2+sgz+fkt2AI9eIP13L+vPFnRCn p3JMZHlWhL/jI2DACC/PcDvehzxmbcjfDdF5m3lvyq7RV0VbXHjjqvQzn aQxAWUWCM7OdDnZym4+YwvmC4UaEk8jtE6pS28bW65MhP8gPdrhYetAb2 kK0jMSpI6TlY8+5xPi8oJ0J3qseT5S03HUlca+QqiwxWRptZOSfEtbr+l cyh6r2glDN2vbpfeFuO0JhU4CiKC5KNsrZ9kucpMs1TuE7Jlnbp6jWmzj Q==; X-CSE-ConnectionGUID: xNMDJ1t+TYOff2U74vU36g== X-CSE-MsgGUID: gUTYU1/1TyuSZHOajp0PwQ== X-IronPort-AV: E=McAfee;i="6800,10657,11666"; a="69374059" X-IronPort-AV: E=Sophos;i="6.21,215,1763452800"; d="scan'208";a="69374059" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2026 18:24:46 -0800 X-CSE-ConnectionGUID: xXzMFsUqR9u3RZJfD5idqQ== X-CSE-MsgGUID: /Rt5lfAqQQOx3t2PtlFV5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,215,1763452800"; d="scan'208";a="203233491" Received: from guowangy-mobl.ccr.corp.intel.com (HELO [10.124.244.130]) ([10.124.244.130]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2026 18:24:43 -0800 Message-ID: <8ba50768-2f05-40a8-b8e8-4364f33ad269@intel.com> Date: Sat, 10 Jan 2026 10:24:31 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] lib/group_cpus: make group CPU cluster aware To: Radu Rendec , Andrew Morton Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Tianyou Li , Tim Chen , Dan Liang References: <20251024023038.872616-1-wangyang.guo@intel.com> <20251221111047.597248db9868d278c7786f6b@linux-foundation.org> Content-Language: en-US From: "Guo, Wangyang" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/10/2026 3:13 AM, Radu Rendec wrote: > Hi all, > > On Mon, 2025-12-22 at 11:03 +0800, Guo, Wangyang wrote: >> On 12/22/2025 3:10 AM, Andrew Morton wrote: >>> On Fri, 24 Oct 2025 10:30:38 +0800 Wangyang Guo wrote: >>> >>>> As CPU core counts increase, the number of NVMe IRQs may be smaller than >>>> the total number of CPUs. This forces multiple CPUs to share the same >>>> IRQ. If the IRQ affinity and the CPU’s cluster do not align, a >>>> performance penalty can be observed on some platforms. >>> >>> It would be helpful to quantify "performance penalty".  At least give >>> readers some approximate understanding of how serious this issue is, >>> please. >>> >> Thanks for your reminder, will update changelog in next version. We see >> 15%+ performance difference in FIO libaio/randread/bs=8k. >> >>>> This patch improves IRQ affinity by grouping CPUs by cluster within each >>>> NUMA domain, ensuring better locality between CPUs and their assigned >>>> NVMe IRQs. >>>> >>>> Reviewed-by: Tianyou Li >>>> Reviewed-by: Tim Chen >>>> Tested-by: Dan Liang >>>> Signed-off-by: Wangyang Guo >>> >>> Patch hasn't attracted additional review so I'll queue this version for >>> some testing in mm.git's mm-nonmm-unstable branch.  I'll add a >>> note-to-self that a changelog addition is desirable. >> >> >> Thanks a lot for your time and support! Please let me know if you have >> any further comments or guidance. Any feedback would be appreciated. > > With this patch applied, I see a weird issue in a qemu x86_64 vm if I > start it with a higher number of max CPUs than active CPUs, for example > `-smp 4,maxcpus=8` on the qemu command line. > > What I see is the `while (1)` loop in alloc_cluster_groups() spinning > forever. Removing the `maxcpus=8` from the qemu command line fixes the > issue but so does reverting the patch :) Thanks for the reporting. I will investigate this problem. BR Wangyang