Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2006893lqb; Mon, 27 May 2024 05:07:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXE2bWIW2qqie9WKQR1MRlYvpuMcl3mbtzaK2FpmlSisXMTuH3A9vf3QfaBvFvGxV89WjbOvVTxPsUMVoxOuamSQiBk9VdZS/A3KQiWKA== X-Google-Smtp-Source: AGHT+IE9XPFSEieKLF/SBYc9HY9b2NWACZNmjjDn9+28Z1AR9vfIwzqS4pLMEmqfz+kkz+qGJXxJ X-Received: by 2002:a05:6a20:9490:b0:1af:995f:1443 with SMTP id adf61e73a8af0-1b212e5771bmr11530180637.60.1716811673062; Mon, 27 May 2024 05:07:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716811673; cv=pass; d=google.com; s=arc-20160816; b=X8C+p7o9a6fKKbmzMO7Sqs+L/HGt6pDAiet0F7/OGt3wO6lraCxKgbdCsh4Bpcpj9E WDD/A5YuE+2vIM1s4L681OvHX7m26srgfex8DtopdXvns2RdfuAE9jYafEGrfUUAZqaf /bOGPnKvliykn0tzvpoe/dovkIBaVG0RXJ34gVRImPzyngOtrHcIbsW0u5m46fWTfeQ2 LcoXuHo0C2u4X2nFHj1G/kt5TEoMQ8IiQxJ1ShZRAffF0ivT6pXyV0lPvUJMDXGmTGNz mTz+OQ+t4i4RDXLa/FzSooNVoAc7y5xIqK0aaj4P/VMTlH85jEUNqpg2dnM/R4nslmQj ef2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uxVg16L1HNg2YuLWU4OfCZVah9g2QZtwxNslbplFlmw=; fh=e/gYlje3ZjThb5nrK8a3RO1fdr9DW2nHLk5fYGDEYRY=; b=hkQU+KxHRPj4lek5J/ppPJQn1nRexH5mg7Iss9jPb4CVn/6b8PDko6P6bZ3EFaADs6 oexGu780WN1JOBeSCJjyF7uny9CK3IKZtcSnjiEI0F4CnH43Hfdn89l7r1oJRBIAyoYF viGrL56A6OHBcofnV/hieqjYBvcvFceAOo3dLLDpNVrMkp1ONn7+wKimf/XUujze0snB CzIQDa3vqacGrFfbT4CPIe30EO8vnjp12bXBf+LNuwEx9LvOivZIbYEr7SbdjZV7ZyyG VY2Z1FDd7Sj+aHMMCA2CE4W3OdH8bGRXenheDneRwC5AtF2kuVfubaasqmRzsV9N+iBE Qjtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Co8LEJEC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190530-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229d0d586si6321545a12.693.2024.05.27.05.07.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:07:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Co8LEJEC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190530-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 681C6281C87 for ; Mon, 27 May 2024 12:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7D2A15ECC1; Mon, 27 May 2024 12:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Co8LEJEC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DD1D515E5A7; Mon, 27 May 2024 12:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811642; cv=none; b=k5TsEj0jwjxpkK+KDic/tIuZb7VUlpzZF5jHi/T8zbK7mUlcgznrHFsGqZvH6RvcxyaXKWNjB2U/OAtvshfJuzzxj08nwJM5x4wpb0rKDLhM9FhBO6PADTUEVfETT3a7w+ktmP5z4UAfnIF+Devw/g7024TnKndV7QQizbkK3DI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811642; c=relaxed/simple; bh=Q6HzBW3LSaYAiupiLhOT8oiqFvjivNTjzbPPDIc2uag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sgjF6yUmTZXJK8BIhdTOg4TvZSSDB2+hc2NTGAgdBXnNtETaRJ49Iwndd7DG+SyDAKIDDLtOhak3OgJwHeghLpc4wxM948TYZbo9pioKpTXVbgZxEaKcpG3mpekF2LPo6lYyGBv7pF9lgdDCENSc4aYIIb/o56mNJFCiLkX68Po= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Co8LEJEC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74073C32781; Mon, 27 May 2024 12:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716811641; bh=Q6HzBW3LSaYAiupiLhOT8oiqFvjivNTjzbPPDIc2uag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Co8LEJEC5qMAS74RlTJm3Yh8502ch8clR/rtF3N1j6+Iyfo3a22VBtL2dObBypVhO iIYNu/iJpmzvMuGytXdALpMTIwYFJtlMjCXNqISEAOCYzUUCrx++iFB/xVq5OJh3Q/ EHEpyBUoY9eLa58JZfMrGMC6yhN+rdHEi8QcDEys+S+pHZOW9cgmfKL9m/CFccgItR PESfW6ZfI/Zw6eY2Pn2mHj2kYtwwxb/7vw1NUYn94ST99X+J4tzJw8GpEF40WfC8tF LjP4IgdjTUGGrm2PyRSdzVIwDYFqaeXkUx3BgJq4IcF5uRNfwjoFBgW68+hR+802fV Xzgo4CjhgQSOg== From: Daniel Bristot de Oliveira To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Cc: Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Luca Abeni , Tommaso Cucinotta , Thomas Gleixner , Joel Fernandes , Vineeth Pillai , Shuah Khan , bristot@kernel.org, Phil Auld , Suleiman Souhlal , Youssef Esmat , stable@vger.kernel.org Subject: [PATCH V7 3/9] sched/core: Clear prev->dl_server in CFS pick fast path Date: Mon, 27 May 2024 14:06:49 +0200 Message-ID: <7f7381ccba09efcb4a1c1ff808ed58385eccc222.1716811044.git.bristot@kernel.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Youssef Esmat In case the previous pick was a DL server pick, ->dl_server might be set. Clear it in the fast path as well. Cc: stable@vger.kernel.org Fixes: 63ba8422f876 ("sched/deadline: Introduce deadline servers") Signed-off-by: Youssef Esmat Signed-off-by: Joel Fernandes (Google) Signed-off-by: Daniel Bristot de Oliveira --- kernel/sched/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 08c409457152..6d01863f93ca 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6044,6 +6044,13 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) p = pick_next_task_idle(rq); } + /* + * This is a normal CFS pick, but the previous could be a DL pick. + * Clear it as previous is no longer picked. + */ + if (prev->dl_server) + prev->dl_server = NULL; + /* * This is the fast path; it cannot be a DL server pick; * therefore even if @p == @prev, ->dl_server must be NULL. -- 2.45.1