From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 88E3C3890F0 for ; Fri, 3 Jul 2026 08:02:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783065747; cv=none; b=uRdRwTmvRszHiLFj2ZMVT7suWm7ZoZwQNgSC1eJbi0jku8h6LHSiLlaoR7ckPM8925KjIWUHVJJgEO4o/WbGyzX4s10OrzBijAz/pWt35hk1pzDGuih69tFNh1ODk8a//Obo+dS3tswzwc817lSkowxioo2TI60K3AlTMZoh07Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783065747; c=relaxed/simple; bh=NN/jfeJFGOBkV4/tq3bgdm5fv3G+AOsx6LPd6UUVFzM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=b7ogXyzQKqwM6Atg2VSE2bPgKGsQISjlzTs4WPqXc7f4/YP+Mv7jGAP5L3sICIA1HnpzaNQLRrAfhX/RyT947b4VZrIoN6krRj0vCRWFtf9rlb4SfY2ou0/rW+FM+sXBKGYhxw+Ruyw95oMfjCKD8dh91pKP/QZJJ8whTLz4c6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ED26ANj0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Kp+ICIKW; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ED26ANj0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Kp+ICIKW" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6635rl2n3134767 for ; Fri, 3 Jul 2026 08:02:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= nWp6srCkGJ+4X+X8huIe6UD062LWbNs4S60lhudW/fQ=; b=ED26ANj0zzhtsLXX +nPsV34j+PG/t/k8CIkYVZf2yhKQcIOW2n5mhHxkWOsIBIZ4lVVoYEwLkH1SXQxY cUTDe6dLz7xaUywYrURMovujGOmT3EkzD+Mfi5O96OSs7/Us4MJrGW4Q3eQ2exND j1gyzfVI5seK9aNxp2avj7aBa4WsPfb8sEsxS7fc0eZQj/Izd7p77ML5KdE+GHdh 2l3DV+HD1vzsgaft9e03K4TQy53EFFZARofEu9ZvNfEHRLQU8Lw+f4xY/U+afXKM KPVTYzOerwiOIaDxxIpPQUScbNaLQ8c+fVQ6OCBs1CgVOtoHoWNNI7KLp5Yx9WLP SXcdmg== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f65qch2fh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 03 Jul 2026 08:02:24 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2c680ead9edso878645ad.0 for ; Fri, 03 Jul 2026 01:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783065743; x=1783670543; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=nWp6srCkGJ+4X+X8huIe6UD062LWbNs4S60lhudW/fQ=; b=Kp+ICIKW4J6/igJ8Vd/KwBI4XLvtv+QmZQwehHLrju9cuZJC/POoSMgGCLDW+wwNXM r34rqIIKgLjXy8zC+dat1lS0x8QgBGEGXfkcZVlVEgLOoyPmIhPuA1PBNcUj+vwhmgrN RqOeLzRCUOKxRkgOGLq+YdZmFtKE9Wku93CasZ2PRLej4T4L3CQQ39toEMHlhcOpp17l PbUG/6I2MtmyRjR9OcV6IoHaH/Uwu8oS6CUpm3vOt4fz2rYzMTvoeKLfXp8wErKGBrPD CU3+L4EbbkNVqlbEOli/xpEeoVLX14Bk4MBkuLO6bkHv/iJb5HypBHWrCvgSuHkp4yw6 vfUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783065743; x=1783670543; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nWp6srCkGJ+4X+X8huIe6UD062LWbNs4S60lhudW/fQ=; b=klJ1fMr6zlKheJwYtIJT993hLpYCi0B8fAm5M3C/CUrtrdKnaYbLUnxzsL+mwh6BY0 foMLe2bHGQ1P21SR3iFZzd8MJS2I7TqVtD5F/KW2ZwAszRaSL/Xbvfluh+cuKKpr0h/P g4Oh/+Pav1mb3pFQukmKpI5z+xl/ApJLup9C2ImbRjfGpUFtQnWzzCLN5Q9AXKI7xpqY 9ZchGOkCTaZE8MA/n7mQdR5rb0HEh4Eh3PmCs7EPbWVu6iQ9bse8cwpwy6/IqqtMp0YQ iAZ7+O1FfGzZlusMZdNmDNJX+2Ye2r4HWvxKI95MTkGr+9j8Wngjb8i1H3OoQAGCyyg8 ejLQ== X-Forwarded-Encrypted: i=1; AHgh+RotGnrugi/qyZLpJgOh5gro/7QXjnm1lUPY3TnXB4jlMqjPLteTIeieyHv3ATkmQTrm3gt/kOZBRjTvY+g=@vger.kernel.org X-Gm-Message-State: AOJu0Yxx292CzVsvRpU8CL61UwsYdCFk3yUiOOkke6lzmGsyOp1JF1R5 uTJPXjj+oZAdpus/iAKInMpZHKuezxH6caGrIbbVKMrNjDyX2QthRztOLFO8NueIgH+zXgXZiHu skDqZlr8jF4SJpY3VSN9C2SUKd4ttktG30fUSAbwnQJcbgW/dTBTos75UTHrNdHWr68w= X-Gm-Gg: AfdE7cmJQpGDZ9IwrjJh8fd7DJciHMy6fH9Cnym6n7ZW1yUmQ6SQIjqc0/9QEHxA9GL ddV5+DVEGboIromhsVUuZgZUgWlQTcinQiLBchBZDYoB48D9/p2mA0MCKDNbY5AmISWZRKskWoW s5IeJf7o0xtBEtEXY7PoMTLfYInhmgoLlmWMHyRjK2XdrwacpcX1tLRaJljh02Qjx4V5PimxCT8 uKDAFJ3vGSNoiP6LJCH5SD93O8Mkn5lu5F9/FMB9rVxtTvVG11SiAlTXG1tXTqt/no8W5hdKHI6 jba/qMits1GtiNGarI5+J5+v95OKiWBdKS53Yj/VnqeocpvpzNVGU1Mt1hYY+hxxGYd6A7OhSCk yw4NrrI/21iDGma/cmDDVLeKBVWGbj1VK+SAc/dXlD5750Y6yfq7eBoQpSk6Z9gCr0aJ3UNBEvo 7dIw== X-Received: by 2002:a17:902:cece:b0:2ca:11ee:b002 with SMTP id d9443c01a7336-2ca7e85c0e0mr65298005ad.5.1783065743344; Fri, 03 Jul 2026 01:02:23 -0700 (PDT) X-Received: by 2002:a17:902:cece:b0:2ca:11ee:b002 with SMTP id d9443c01a7336-2ca7e85c0e0mr65297715ad.5.1783065742742; Fri, 03 Jul 2026 01:02:22 -0700 (PDT) Received: from [10.133.33.129] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cad7765767sm5463305ad.46.2026.07.03.01.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2026 01:02:22 -0700 (PDT) Message-ID: <1d647745-35fe-41cc-8712-aeeeca090837@oss.qualcomm.com> Date: Fri, 3 Jul 2026 16:02:16 +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 04/12] sched_ext: Avoid migrating blocked tasks with proxy execution To: Andrea Righi , Tejun Heo , David Vernet , Changwoo Min , John Stultz Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Christian Loehle , David Dai , Koba Ko , Shuah Khan , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org References: <20260702171909.1994478-1-arighi@nvidia.com> <20260702171909.1994478-5-arighi@nvidia.com> From: "Aiqun(Maria) Yu" Content-Language: en-US In-Reply-To: <20260702171909.1994478-5-arighi@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: qUATODLejT0As4fw3kHrmsXaT2WGGM6F X-Authority-Analysis: v=2.4 cv=Bb7oFLt2 c=1 sm=1 tr=0 ts=6a476c90 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=1XWaLZrsAAAA:8 a=Ikd4Dj_1AAAA:8 a=T-V_DFgFBbllJtQJZNIA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-ORIG-GUID: qUATODLejT0As4fw3kHrmsXaT2WGGM6F X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAzMDA3NSBTYWx0ZWRfX5X6R1uPCEAQd nM2yljNUaxyPlKMJDskzHrHJqVof1mIpysyK/bTsZ5Po2DAHf//MXuWWPwE99aVeFkF6x/Xs8FU URjtz0WGYh1k1LCrqNqHPX4lwumhasCJia7JkCW8LS4ia1cNVmI1AZ2VTBYG8ro7sbu5VWO5ehe CNOL37gtsGlnkli4IMiohac4024Rsalskci/fQyJ+sWViLSSoJQJKZ34AYaIIQNWKbq5nCZgEcU /6c9a794iCs1vEVKcFZ5ipeiFfzfGfzfFPuZCeD22UzNZ1m/jXYyd1s2dUqTilIHcDkF1IeY/MH QRMX4BvnOxQb+jErM9sIvVd89U0H7Ck6VVQ4KqJzJ0Wv2QWTc1sBbTIrC341Ipx2qKsuV2rBBPQ huBLKJNMOnSJzkPlpRB+tQgLnWgdfHrGWj4ipQ9ecE3w+WrwQ5JZ08/ceuaBaGv6cH3e9M5/vXA QWJ2vDOn/7uTbIEm9wA== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDA3NSBTYWx0ZWRfX9HlQamA35zYj GNTVAsIJ2T/7+7o49kxQC4Ai1l8VRqd7sJ9NBplGtQt/UwJuP6c6QhmWCdRqLfcVyfSeWoNB69y ua1A3pQVzCBJh0Gj8LauDQ7Og85Q9iA= 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-07-03_02,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 adultscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030075 On 7/3/2026 1:09 AM, Andrea Righi wrote: > From: John Stultz > > With proxy execution enabled, mutex blocked tasks stay on the runqueue. > Later with donor migration they will be migrated when necessary by the > core scheduler to boost lock owners. > > Don't try to migrate mutex blocked tasks, the proxy logic will handle > that. > > Co-developed-by: Andrea Righi > Signed-off-by: Andrea Righi > Signed-off-by: John Stultz SOB was suggested to have the current committer at the last line. Not sure if it is the same rule for the subsystem here. My understanding would be: Signed-off-by: John Stultz Co-developed-by: Andrea Righi Signed-off-by: Andrea Righi > --- > kernel/sched/ext/ext.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c > index 1588565050679..9a672b9a55f6e 100644 > --- a/kernel/sched/ext/ext.c > +++ b/kernel/sched/ext/ext.c > @@ -2150,6 +2150,14 @@ static bool task_can_run_on_remote_rq(struct scx_sched *sch, > > WARN_ON_ONCE(task_cpu(p) == cpu); > > + /* Make sure tasks aren't on a cpu */ > + if (task_on_cpu(task_rq(p), p)) > + return false; > + > + /* Don't migrate blocked tasks, proxy-exec will handle this */ > + if (task_is_blocked(p)) > + return false; what about return true here for owner_cpu? if the owner_cpu is in the move_task_between_dsqs stage for example. > + > /* > * If @p has migration disabled, @p->cpus_ptr is updated to contain only > * the pinned CPU in migrate_disable_switch() while @p is being switched > @@ -2784,6 +2792,23 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p, > if (p->scx.flags & SCX_TASK_QUEUED) { > set_task_runnable(rq, p); > > + /* > + * Mutex-blocked donors stay queued on the runqueue under proxy > + * execution, but the donor never runs as itself, proxy-exec > + * walks the blocked_on chain on the next __schedule() and runs > + * the lock owner in its place. > + * > + * Put the donor on the local DSQ directly, so pick_next_task() > + * can still see it, find_proxy_task() will be invoked on > + * next->blocked_on and either run the chain owner here, or call > + * proxy_force_return() and let BPF make a new dispatch decision > + * once the task is no longer blocked. > + */ > + if (task_is_blocked(p)) { > + dispatch_enqueue(sch, rq, &rq->scx.local_dsq, p, 0); > + goto switch_class; > + } > + > /* > * If @p has slice left and is being put, @p is getting > * preempted by a higher priority scheduler class or core-sched -- Thx and BRs, Aiqun(Maria) Yu