From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 3AE2935898 for ; Thu, 18 Jun 2026 03:44:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781754296; cv=none; b=Jnr/5x1UYqtjAComcy7GmLb6gJnYJ+3gK5Ppmml7c48UlvGbSLjRODuS0bS2TKvIC9gkMsxymVzxR8BKjd2it12j3bmwab7LDY5xB3SjwOKwER/O0XOnLa03F8qTGPReFn6naLJqOG6K8DpkpWKL0P+6q9JAhHYDP9fxujAWasc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781754296; c=relaxed/simple; bh=j/yhXW/9dWJieDgnN2S5BNBdDvKwTvgtAwQmyUMKCOI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MqmQifJj+KTftvkIDnskH9M/wofQfHBtj6r7ltV2tqXISu3ntpv8Elnf6WP6fre9ifal7XOVN6R3G2hanGPw/bmI4VVjvFWjkrrKSoZXbTxq5PI+FYulP8vFXk0a1crKx7nYxQqD2SWoEJ0zLP03+kU1BtlwZ8MpP/++fCLes6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=JgEgRAVG; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="JgEgRAVG" Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65HHmGMW1250806; Thu, 18 Jun 2026 03:44:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=6+S3bM cLrYK3mA0RzmKHX/69tkzpxypLgz/eo+RIaQk=; b=JgEgRAVGUXfvbi5O7CdMtx 0CGSi/s6CIN7bJuK4ZgElALRzjY0VYErXVZ7EwnkYDA6LdShB6gUg+DyLna5EeYT xur9UuFjhgdVg7v+wGol1VikHlkjjekLCgluUsk0iaweDMI83YlpJ67kX9TsjpVe 3vCPirrbiKetYeODXfK5tqu4scuguJqBs+pNNNO5dRpT5hwcOd4Rsq/s3+mtlai4 +SxtuXALiVqBtdHZEUchEd7bKOBTEAGN2S2TerkNlHWRGj3+jm9w0rOZ0PcUZDsi lQzFrAn6+HBrRTwx/yt2AHLKT2prIrWKY9DfJnLKuBAHw9xFV9Dv070Ykz3yYMGw == Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4euequ64ge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jun 2026 03:44:29 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 65I3Yiap004104; Thu, 18 Jun 2026 03:44:27 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4ev1729s16-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jun 2026 03:44:27 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 65I3iNiu24117706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Jun 2026 03:44:23 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C2F520043; Thu, 18 Jun 2026 03:44:23 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9894720040; Thu, 18 Jun 2026 03:44:16 +0000 (GMT) Received: from [9.123.5.233] (unknown [9.123.5.233]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 18 Jun 2026 03:44:16 +0000 (GMT) Message-ID: <9859dec6-7e57-4079-855a-3bb82d3d890c@linux.ibm.com> Date: Thu, 18 Jun 2026 09:14:15 +0530 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 v4 03/20] kconfig: Provide PREFERRED_CPU option To: Yury Norov Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, kprateek.nayak@amd.com, iii@linux.ibm.com, tglx@kernel.org, gregkh@linuxfoundation.org, pbonzini@redhat.com, seanjc@google.com, vschneid@redhat.com, huschle@linux.ibm.com, rostedt@goodmis.org, dietmar.eggemann@arm.com, mgorman@suse.de, bsegall@google.com, maddy@linux.ibm.com, srikar@linux.ibm.com, hdanton@sina.com, chleroy@kernel.org, vineeth@bitbyteword.org, frederic@kernel.org, arighi@nvidia.com, pauld@redhat.com, christian.loehle@arm.com, tj@kernel.org, tommaso.cucinotta@gmail.com, maz@kernel.org, rafael@kernel.org References: <20260617174139.155540-1-sshegde@linux.ibm.com> <20260617174139.155540-4-sshegde@linux.ibm.com> From: Shrikanth Hegde Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE4MDAyNyBTYWx0ZWRfX7Eih1qvHM5Js Unc9jd0PrLVwPZww4XSiUNUOBP3YnPXNVHpq9EZ/Q7Le6xngt7zmpyoAEonPO2RY/QYwqCtW3IW 9JFItR/U92S+5R/wa1u9XRqJvXEqgJQ= X-Proofpoint-ORIG-GUID: GvHNLlGHClRLJE6wmYinc2tXH6mo85Yv X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE4MDAyNyBTYWx0ZWRfX/mpd6C1h74vV zzmSdFhAKduiPjlRx61vkq5xQlcA1TCo6N1hE19ze58xkDntAciY2KxwPLc8ZuEMeZcxvglsdLA PXzriP0XvO8XPqI6n3MNS6G+GxFBwh+6tKxqinb6+VKiGj9t3VOJg2KB7HJFmPz1XYszrw+AjM0 VJSnQvet2Tm9EaJHjjH+R47KVVZ7msf228Gz38X5Ja6HxSKEtaxAFeRBsAvaLq74eSV1j9yFNbk adjFWkLekhm8jc9wFaayIN5XAx9hB7z4R6RrCqlAbKZxtItHzr9R6wCCTUeGiuCi16+LRYoseri /WII0PLkflutSZbiTbpxa2kHMzSwtCe4slEFPKcttiyRslOi92BLLRsOtFJImOj4vQY493Gn3m2 stQq8p65LbhQB2CFAROF8lxkcJWJBL/EQslMdW1yFStU5HS5jMkRdBHMWDKA4Q7YMGdZvGVRJfn JhNJzsp3GC+GV1pjQ/w== X-Proofpoint-GUID: e3pSpsEcrn9iGsKPGULY-htH9QnvMtWl X-Authority-Analysis: v=2.4 cv=L9gtheT8 c=1 sm=1 tr=0 ts=6a33699d cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=NEAV23lmAAAA:8 a=VnNF1IyMAAAA:8 a=MdQ6rJ3gd6seWtgPM4cA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-17_02,2026-06-17_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1015 adultscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606180027 Hi Yury, thanks for reviewing the patches. On 6/18/26 6:21 AM, Yury Norov wrote: > On Wed, Jun 17, 2026 at 11:11:22PM +0530, Shrikanth Hegde wrote: >> Introduce a new config named PREFERRED_CPU. >> >> This helps to: >> - Avoid the code bloat when PREFERRED_CPU=n. In that cases preferred >> is same as active. >> - Avoid the ifdeffery around PREFERRED_CPU in many files. >> >> Since paravirtulized use case is the main driving force of this >> feature, make it default for kernels with PARAVIRT=y >> >> Signed-off-by: Shrikanth Hegde >> --- >> kernel/Kconfig.preempt | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt >> index 88c594c6d7fc..0995f5ba66eb 100644 >> --- a/kernel/Kconfig.preempt >> +++ b/kernel/Kconfig.preempt >> @@ -192,3 +192,16 @@ config SCHED_CLASS_EXT >> For more information: >> Documentation/scheduler/sched-ext.rst >> https://github.com/sched-ext/scx >> + >> +config PREFERRED_CPU >> + bool "Dynamic vCPU management based on steal time" >> + default y if PARAVIRT && SMP >> + help >> + This feature helps to reduce the steal time in paravirtualised >> + environment, there by reducing vCPU preemption. Reducing vCPU >> + preemption provides improved lock holder preemption and reduces >> + cost of vCPU preemption in the host. > > If it doesn't make sense for non-paravirt kernels, then > > depends on PARAVIRT && SMP > default y > Ok. Yes paravirt is the only use case today. >> + >> + By default preferred CPUs will be same as active CPUs. Depending >> + on the steal time when steal monitor is enabled, preferred CPUs >> + could become subset of active CPUs. >> -- >> 2.47.3