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 9E05518A956 for ; Thu, 23 Oct 2025 04:04:28 +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=1761192270; cv=none; b=BMiD0fyTdYcn7jYUw5gt0HHOVm4iYD0OUevIH97X1tJPbhFLXSdJYjh5030AhBlgJGR/3G/1IliG8sdiZATQ38FCmPu4dxP3QgF+S3eZmf15GNY1xbg2i8dY4Fve2WC8VNThfroo65k/Ug+B+EDC+Y5u267pRPgD5JCTfL4AaMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761192270; c=relaxed/simple; bh=paEUxBgZ9iBMnGgQLx04Tago1k4qIN7ExmrYSg9GYGY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hKsgEpOR4vUzyXoScOKJoHn1yW+PcbQ9xDeJ/H3lnJTd+nXQms1+1jSrI3n+vJTmL+HwM1Dl1vsr3i6HhFZzWMTzkMN7l9vcKGNaYfXmE1vMnxPWS5tGEYGsS5XDm8Ckt2zD6snmj4Im6r2jjoL6sJ09Pyk6AMQIrCHIwHMss20= 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=qqE2oKM3; 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="qqE2oKM3" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 59MLMA9j031196; Thu, 23 Oct 2025 04:04:09 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=kNqq/b IE1J52ZfD77A5OJ4HQCqtofGAaXPUWDYZC3HM=; b=qqE2oKM3aYqpoV+9NG+S6r KRpqEqw/PF95ZD4lYALCAOlE8OyOOEVdZhrX1OQ8/YnryBUwZ1UvVtRUSVdZt9nx Fl5Nx/IEoZYjyWJ3MIZDwqiqkTESTc4la+QiBWh6DIVXCjhFST3ErQG0Ke8q56B9 4VxZFgMZ93oES9VDKfaj1SzTHEUNiCVboesynAaaeX7R3chtCDWuzPMwAZbt0IpD QzOZJ8ygrbRtUrxK1dkEyjKgjjwIu905ZHS94lm/8peNQryWG4UGMDpngchIbrSh DGWyf4KpBI+Wxe16LSyFUn/iNlYDLwZYlSgxg9LAzAgkGi1Lnt4oWcnxVvXTNahQ == Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 49v327069s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Oct 2025 04:04:09 +0000 (GMT) Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 59N41SVA015176; Thu, 23 Oct 2025 04:04:08 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 49v327069k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Oct 2025 04:04:08 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 59N2aEqQ002281; Thu, 23 Oct 2025 04:04:07 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 49vqejknn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Oct 2025 04:04:07 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 59N443di51839398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Oct 2025 04:04:03 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B784820043; Thu, 23 Oct 2025 04:04:03 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 26A0020040; Thu, 23 Oct 2025 04:04:00 +0000 (GMT) Received: from [9.109.215.252] (unknown [9.109.215.252]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 23 Oct 2025 04:03:59 +0000 (GMT) Message-ID: <4d2f41ed-4cab-420a-a7ba-f11a45924c9a@linux.ibm.com> Date: Thu, 23 Oct 2025 09:33:59 +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: [RFC PATCH v3 00/10] paravirt CPUs and push task for less vCPU preemption To: Paolo Bonzini , Sean Christopherson Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, tglx@linutronix.de, yury.norov@gmail.com, maddy@linux.ibm.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, gregkh@linuxfoundation.org, vschneid@redhat.com, iii@linux.ibm.com, huschle@linux.ibm.com, rostedt@goodmis.org, dietmar.eggemann@arm.com, vineeth@bitbyteword.org, jgross@suse.com References: <20250910174210.1969750-1-sshegde@linux.ibm.com> Content-Language: en-US From: Shrikanth Hegde In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=EJELElZC c=1 sm=1 tr=0 ts=68f9a939 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Zoj0bJXJtDvkO92F0TYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=cPQSjfK2_nFv0Q5t_7PE:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDE4MDAyMiBTYWx0ZWRfX31ySbOXlWtrv 36HjYPNht7QqJ8cVglDFimrajnMGXUo0ccUOu+Em+zLwxF00WDYiiHKYGsdSsnwGg8EKSYZSAPB XKc4zv+43LYRM/q30xU2gt4mHm0JOAD44az/GH3EY/DfQ8bu4I5ehILFxMG7IiRBB4b7w0bljOH imIKsaCJ7ztVX5BsQiHmieFXkVaJkoEJKebGFEyyr8p6CPGc3nhYoADKAb92AyD3xSnjH1DIVW/ dNZ6+1zRtXnrzdRaaq1mIAO0N1237aqLmbOPXgQvA7RQeJ0LvDYSBjPHL1QU9ldJTLstIm6ItRC paubwmdw/5J2HDegcVg6EV2a80JUEiDL/01jtj5oCAay7lnejvVeGYAsD4dBtyls02PQkU2pe2h T2EX2nW/powb4VbwOZT/Nd+vhQdsGQ== X-Proofpoint-GUID: 7AYUV3o335U8A7KKkJkO2g6VjFIco6ML X-Proofpoint-ORIG-GUID: LzGoaR3-um5SC2JWdi-dBlo3OVIsc2-4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-22_08,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510020000 definitions=main-2510180022 Hi Paolo. Thanks for looking into this series. On 10/20/25 8:35 PM, Paolo Bonzini wrote: > On 10/20/25 16:32, Sean Christopherson wrote: >>   : Till the hint from underlying hypervisor arrives, another idea is to >>   : approximate the hint from steal time. > > I think this is the first thing to look at. > The current code i have does the below: All of this happens in the Guest. No change in host. (Host is running PowerVM, a non linux hypervisor) At every 1second (configurable): 1. Low and High steal time thresholds are defined.(configurable) 2. Gathers steam time from all CPUs. 3. If it higher than the High threshold reduce the core(SMT8) usage by 1 4. If it lower than low threshould increase core usage by 1. 5. Avoid ping-pong as much as possible. Its an initial code to try out if it works with plumbing the push current task framework given in the series. > Perhaps single_task_running() can be exposed in the x86 steal time data > structure, and in fact even in the rseq data for non-VM usecases?  This > is not specific to VMs and I'd like the steal time implementation to > follow the footsteps of rseq rather than the opposite. > > Paolo > Sorry, I didn't follow. You mean KVM usecases? I don't know much about rseq(on todo list). Any specific implementation i could look at done via rseq that you are talking about?