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 7DF0F2D5A0C for ; Thu, 20 Nov 2025 06:22:51 +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=1763619773; cv=none; b=N8dZ4sjBBg0/EexegCwq/hJQK+4zdPawFRnayAR4keejlIvkera7E33MPreRNiipTFVf6NHAmU5vSEAAWMqrC/ZzItKDfaUktDpaeXFzeZZ/9AxyAmu/rSpLmbx70GjP8lQY+utXwcZnI3W/nk4aeYQK2RFF8gKBlFaG8OE8iYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763619773; c=relaxed/simple; bh=+MsusGeIpvjynfbv4L9znxm1+6Z/W3swPheGV+t8low=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=vEVnJV+fuhMekkFvceIP3YdlBvn8y+LRG9qRm8ObbzuddYc/8ic27ohRCZPc4UYe+Mx5J6JfoQR9IKji7Jxl2fUtwRWds+0BxkR+UvqjVYrBtuzNMC9KeNjkdtD0Mj9/VUS0zUsnJ+8MEX4yuUq8AcoDIow/9wRGSrfsxgJV0XI= 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=Spk5VxWD; 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="Spk5VxWD" 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 5AJLkrm9029035; Thu, 20 Nov 2025 06:22:13 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=NBIKYI WDA14mXzp/lWMKji1i24sBQ16/NVPhi+7JUAE=; b=Spk5VxWDAidIxZ9USN+3rp UmFJNV/bMMCLvhX6+BRenoPnVWimXym7856kZkNQQJdG2In2L8OAVcMeqGaS3By9 XdeqebFPympw02kFjBTRh4yphivrGWJRTphbqyj6xQ174PFo9y3KLspPwnYx3fJM ve/EiMQolVlxUsFBD0fACoav/uy1Wo1yFT4G5TX+SIzjCNRQn5K4FzQT2ZXnCuPv tnWgzLxRk0wsW//3niZiJRgutYaqtD5UlQbmjV/78WS6E4MeOsCYOVd/tZlm3I8K 9Q8Os/8sFSh3JNlX4r1+8Y3EAHwL6eFMJxWjFiE8Kbc2YgZtw2wVpbo/28fKiWFw == Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4aejk1mtcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Nov 2025 06:22:13 +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 5AK6Hr4E013339; Thu, 20 Nov 2025 06:22:12 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4aejk1mtcn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Nov 2025 06:22:12 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5AK5r1Bv022347; Thu, 20 Nov 2025 06:22:11 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([172.16.1.6]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4af4un4wpx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Nov 2025 06:22:11 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 5AK6MA3R30867994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Nov 2025 06:22:10 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4962A5805F; Thu, 20 Nov 2025 06:22:10 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44DA958043; Thu, 20 Nov 2025 06:22:05 +0000 (GMT) Received: from [9.98.110.226] (unknown [9.98.110.226]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 20 Nov 2025 06:22:04 +0000 (GMT) Message-ID: Date: Thu, 20 Nov 2025 11:52:03 +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 1/5] sched/psi: Make psi stubs consistent for !CONFIG_PSI To: K Prateek Nayak Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , John Stultz , Johannes Weiner , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Suren Baghdasaryan , linux-kernel@vger.kernel.org, Madadi Vineeth Reddy References: <20251117185550.365156-1-kprateek.nayak@amd.com> <20251117185550.365156-2-kprateek.nayak@amd.com> <892917ec-15b3-4852-b12f-9232e438802f@amd.com> Content-Language: en-US From: Madadi Vineeth Reddy In-Reply-To: <892917ec-15b3-4852-b12f-9232e438802f@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=C/nkCAP+ c=1 sm=1 tr=0 ts=691eb395 cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=1XWaLZrsAAAA:8 a=zd2uoN0lAAAA:8 a=VnNF1IyMAAAA:8 a=d3VxR-ikyD2JdXqXV7cA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-GUID: 6Cy4pC1k-OIgWp-utEXkCjrLV4WiErLO X-Proofpoint-ORIG-GUID: tTnDtrxPIUHZ8XCC7F2oEd37hXby6dGO X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTE1MDAzMiBTYWx0ZWRfXxuhBrKSSGUmI v45EjL0c7jHgFIX47SCo6gju7Duu5r/Y2bYCtu15P4XERbuNuxyp61ZQ3eMiwcY29JnlW1jnqct 8dU8OdriDYne7mBTwZ8/L7oiRVQP+kOEPEBnktQuBMvbOO+XBj59hP6QiwobqvldWOM1d/oyw8F 1YJJwo6+r/wLGqwQO4NY3pxBw9mWG576ou1a+RyYuN6N9vtKa0Ik79ON3rce8MqEs1q3rOLEmhk Y9bcIdFcR/WLMGzIDXYK3wJJvXj1epSvR4vVnEi/nRLLgYAvPwu2yWk1SwQuWOzjAhRMYbBkHXL WIGY212AXOxAVFLgfmMYhEH7XhA3rOdcYc0hPd/kzHRkNKGxuCnV4wBOat4vwtz/ztSSAX9mPuZ ia4KWywcxeRYpAnYFRbqtL1EqXeN4g== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-20_02,2025-11-18_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 spamscore=0 impostorscore=0 bulkscore=0 malwarescore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510240000 definitions=main-2511150032 Hi Prateek, On 20/11/25 11:40, K Prateek Nayak wrote: > Hello Vineeth, > > On 11/20/2025 11:29 AM, Madadi Vineeth Reddy wrote: >> On 18/11/25 00:25, K Prateek Nayak wrote: >>> commit 1a6151017ee5 ("sched: psi: pass enqueue/dequeue flags to psi >>> callbacks directly") modified the psi_enqueue() and psi_dequeue() >>> functions to take the complete enqueue/dequeue flags but left the stubs >>> for !CONFIG_PSI unaltered. >>> >>> Modify the stubs to also accept the flags argument to keep it consistent >>> with CONFIG_PSI. >>> >>> Signed-off-by: K Prateek Nayak >>> --- >>> kernel/sched/stats.h | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h >>> index cbf7206b3f9d..3323d773fec3 100644 >>> --- a/kernel/sched/stats.h >>> +++ b/kernel/sched/stats.h >>> @@ -221,8 +221,8 @@ static inline void psi_sched_switch(struct task_struct *prev, >>> } >>> >>> #else /* !CONFIG_PSI: */ >>> -static inline void psi_enqueue(struct task_struct *p, bool migrate) {} >>> -static inline void psi_dequeue(struct task_struct *p, bool migrate) {} >>> +static inline void psi_enqueue(struct task_struct *p, int flags) {} >>> +static inline void psi_dequeue(struct task_struct *p, int flags) {} >>> static inline void psi_ttwu_dequeue(struct task_struct *p) {} >>> static inline void psi_sched_switch(struct task_struct *prev, >>> struct task_struct *next, >> >> Right. The commit that updated the function signature did not update the >> !CONFIG_PSI stubs accordingly. This patch corrects that. >> >> Reviewed-by: Madadi Vineeth Reddy > > Thanks for the review. > > P.S. John has an alternate fix for the same at > https://lore.kernel.org/lkml/20251118055242.4030849-1-jstultz@google.com/ Thanks for pointing this out. While going through the discussion I had seen it in John's tree, but I hadn't realized it was already posted upstream. I gave the Reviewed-by since the first two cleanup patches still seem valid and can go in independently of that alternate fix. Thanks, Vineeth > > That considers a blocked donor as a runnable entity from PSI > standpoint. > > This series implements the alternate approach of blocking the PSI signals > when the blocked donor is retained on the rq, skipping the block_task() > and it enqueues the PSI signal back when the donor is woken up again. >