From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8862D3AEF3F for ; Fri, 24 Jul 2026 18:12:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784916767; cv=none; b=K/MngJoHPsFUrv1KLYrQow3vtgnjsfFcnpv4OMf6tGOT8G/Hvrck9TlCjtQdTyOn9ur1RkJCe/T4qs+1s6TYW6/PEo2J9emXSuhyNafQO6O5VvNv/LvvOxUYFDlMMKGHO0g8f0PYr2V+PMM7W7w3syB7UxFGHrX+eF67ui5n1IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784916767; c=relaxed/simple; bh=FzcGsrUN17ifre3P9vJd3tfeebpT7itoQNejEk7m8SI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ao9/b8ruAuTP/PSgEaD4YVm5kJXGynlvwAR5DZTEM/b2KbMv7glB7kk5wqstHjjNYyt1uuRsxVoRraLq0QRKMLO4DBYLIw1SyR+aqANwEXT+b3vDZQGvMXV1C0XW5uRaP3lZS1SqF2hqDMEWgwl6K8hmISzj724g/zhbq3sFpfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jstultz.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UUPoOm4/; arc=none smtp.client-ip=209.85.214.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jstultz.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UUPoOm4/" Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2caf4173b1cso12415595ad.3 for ; Fri, 24 Jul 2026 11:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784916765; x=1785521565; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WIEiccwdSFaUPusHTMl+DdTe7ivr6hPIsg8PNnTooow=; b=UUPoOm4/loplQqTwfymRnWydv7NMS/jSna6mxyBSaViqoULbDU4IASX9VjY2jgl+UT acrRcIQBYEMHH2iuu/lTYalNDUD6G9jwdD8VnCVnDecNQcNrIY2pLfM/8YBJ+XYZtbW0 D2UG2K7RpsEdVrgBvcf0SU2mre1voN3qGMR0yXDZojqvFqJEnGEi3mYDXdMgWLXkGQOu C1IPrBE/kVetIRcy2BQQr7RZ6y/UpLK+4ByBpHN+L5PEg0PX3YWW8SrKa7luYolJvWqF JaJTSSnNrzUdrc5rNYTUw3BxJjW6Kf5T9Jy/yDEdxjd0V5gcT4dbT2gYqNohmUFkjVCc /uYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784916765; x=1785521565; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WIEiccwdSFaUPusHTMl+DdTe7ivr6hPIsg8PNnTooow=; b=IEKNQnjO/Dlf2Y/anmg0ZY5EICBLT8KoTES7pSt42R7muwLAMftYa7HNYr2KgeULZk IRHC7WQbnP670Edt1D8ad6yOsbGgAuzUPIy8midKFVUZXKz9yugRxlqsaGUImYDtNyJG 3zl/hHAU4TfQU162W+N1eqnOq8OBaX3NedkQan/Juy+YVpKl+V5fd3KBFSA2CpsBlSDF gnNpGT9AxkQnywPjqulShnG5xXz/Ob41TGduwxchqUeTcINyUL9UDzscu/pCjHrvk99O mX1AUfmLJ4fQ5tYsW6dXu37q/zYSyE9BPWWK8egroqQXIB1JUqrsKJAe+iufKUQE+mfs OvHQ== X-Gm-Message-State: AOJu0YznaHb9MDIibznVQ2ITFZgKcagmVrFMxEVXqviaZblW5xdeBs64 qj4IT5waHmMcBjtla9VCqarvg/5NPQv5t12gIbhzrrAyAlPfzdPn9xAxNHDI1WNTjj7yDVt6bmQ BWUg4yQd2LnCuGDdnAgR9rRdqDzr7NCBTVSWx7Am3MGJeMBxgRtSXp/A3Nnataq3lLD8Qpz59sw EJe2WKRs+WENvGZbsAzhrVvYujmfx/tClLP8Kz9E/heuniT9N5 X-Received: from plot12.prod.google.com ([2002:a17:902:8c8c:b0:2cc:7e9c:2c37]) (user=jstultz job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:e786:b0:2ca:6d87:cda0 with SMTP id d9443c01a7336-2cfa71b75afmr95463425ad.6.1784916764558; Fri, 24 Jul 2026 11:12:44 -0700 (PDT) Date: Fri, 24 Jul 2026 18:12:17 +0000 In-Reply-To: <20260724181238.3445275-1-jstultz@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260724181238.3445275-1-jstultz@google.com> X-Mailer: git-send-email 2.55.0.229.g6434b31f56-goog Message-ID: <20260724181238.3445275-4-jstultz@google.com> Subject: [PATCH v31 3/9] sched/core: Avoid migrating blocked_on tasks From: John Stultz To: LKML Cc: John Stultz , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , K Prateek Nayak , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , Andrea Righi , kuyo chang , hupu , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Its not useful to migrate blocked_on tasks from other runqueues as the proxy logic will just migrate it back to the owner's rq. So skip blocked_on tasks here. Signed-off-by: John Stultz --- Cc: Joel Fernandes Cc: Qais Yousef Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Valentin Schneider Cc: Steven Rostedt Cc: Ben Segall Cc: Zimuzo Ezeozue Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: "Paul E. McKenney" Cc: Metin Kaya Cc: Xuewen Yan Cc: K Prateek Nayak Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Suleiman Souhlal Cc: Andrea Righi Cc: kuyo chang Cc: hupu Cc: kernel-team@android.com --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e7074ba54a91f..8e661b5f133d7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6477,6 +6477,9 @@ static bool try_steal_cookie(int this, int that) if (p == src->core_pick || p == src->curr || p == src->donor) goto next; + if (task_is_blocked(p)) + goto next; + if (!is_cpu_allowed(p, this)) goto next; -- 2.55.0.229.g6434b31f56-goog