Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1283079rdb; Fri, 16 Feb 2024 10:32:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUtS8Pj49zQzmjaG2u63/ShUEBIYDO0TCzWk0t7PVZNHwRdCoFb84NRe+Z/QhALQpiTV5b7VsqgmHqhf4uUXUNPX/Qfu6r6qPrevtNBdQ== X-Google-Smtp-Source: AGHT+IEBXPiHKKJsxVFHVWrDJEaIPKu3kbgf2YTDD9kttXLsYKo5LUq7NV7fKB6S84Sz92wAkyUW X-Received: by 2002:a17:906:240f:b0:a3d:47dc:e3a8 with SMTP id z15-20020a170906240f00b00a3d47dce3a8mr4224089eja.3.1708108321145; Fri, 16 Feb 2024 10:32:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708108321; cv=pass; d=google.com; s=arc-20160816; b=yyfT7OzCyy9R/YBMVKjFUVNzbYL0TRTS2TUXmlCmYajlFcgYjm2gQwk59VxOvc/FPk rdn5PD0DdWdkcRAM+rMV9l2Huv3McFH3iJvliMfwiy/zGC6zOONyYLgV0lIbALlkj2bh eunHxWzP7Ug9z1qtgrEoIiip850qW66LIZ+7I88tWyTzKwCpMouTcyw3KrL78elOMOLc zBmnLtwYP+s3Bu/6NMNNGGoi+yj2VB95QiEFDdH12Uz0hx3oiHNUbE38lK0Ogv43NsAu DqhHnF497VlqzcqBtqCFHvFLRGzaMcGHHkeZfOM7KQF2ySknXKpAvJ6eCZjMui6vK5AX qwAw== 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=dVFjYg00n2ZAFDWX2JpqdHNuxugRyfOJfGbuxjDxV/Q=; fh=M2d0eEwkotGwrCl/QH/u/fnmeLJn9ZwWPiMveRgwy+8=; b=blsxu6vLNy6iu9syuR3fvBGzfrR8PoyP/2oH25DNCGBishPMcNiY3GiOetO5i0tLzB 0nF8OrFRDVvpF6HX/dxCZ80jV2AHuTwKaIUEbRYAM4teTCrhpX5IdJXDesXhb6l0CNjd xmhD9TAA5XCprduorNoi2D6gV1pz5snppq5URCdgbBoAQUEOH/YNpjEwFzeTEWc7oiUI 32yElsCmFkzJfWOd2mRpiFlaC+httU9UvqxaL2SJSBsXeDSR5IfjNokiaLqtkGorJwlD pIOpDTa/kYzshuQllD5A1Bm57gpeCosf4nB3l1fTM8Gm3aqFzHU80tSb4CV1CUjZro7d B1sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=jtG1w6j9; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-69160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69160-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r8-20020a170906364800b00a3bf40be1acsi154483ejb.388.2024.02.16.10.32.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:32:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=jtG1w6j9; arc=pass (i=1 spf=pass spfdomain=joelfernandes.org dkim=pass dkdomain=joelfernandes.org); spf=pass (google.com: domain of linux-kernel+bounces-69160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69160-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id E04FE1F218F1 for ; Fri, 16 Feb 2024 18:32:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25C3E1350E8; Fri, 16 Feb 2024 18:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="jtG1w6j9" Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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 BD40C12FB18 for ; Fri, 16 Feb 2024 18:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108302; cv=none; b=CRRa83AkzCXeZS4TB5Hze0hoWJVsVrSAJ6T/lZfXjw0cqip3NWj0c2KZjph8RJg76GWrHjoB8ewNRvKDJOmyXTYrHVNyBWnXaFl0wL2hzN8KwWAeJg8V7W76mAyjSJBfq0HK0hEsDbO2FLuoUqJ7ml43EmtkkWKJJREWBngF0Ek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108302; c=relaxed/simple; bh=/tum2WF4xPzP3d2/oUJvAp904N/cyC9DIis13Mprwms=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HhhFfbGXCyGXvimt2OaVALuE1Bisilw0lodYH5/8x45glyZpKAanQ9ttBmUXYJOxg1U0Y9D2GRB+g2Hfctcv+rkH1pk49p3DTAdH78gES1whLOFy5UxA/dnZKCNngQUsAGHSGGOxtaVUxYOOwLQROP4gh6C52FbuJx4W9fqqftk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org; spf=pass smtp.mailfrom=joelfernandes.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b=jtG1w6j9; arc=none smtp.client-ip=209.85.161.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=joelfernandes.org Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-59a94c0fb55so1148342eaf.0 for ; Fri, 16 Feb 2024 10:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1708108298; x=1708713098; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dVFjYg00n2ZAFDWX2JpqdHNuxugRyfOJfGbuxjDxV/Q=; b=jtG1w6j9N5plCISXLHBSv/uwTyCu7EH8Sx8Ee3zv11t6ywmECZSmwpY0oybC7bZ5vs 3HQnp+vpaNyOiNVApl+5btIdCgtlyPizk07ugC55D8sOSb7Fu+M2dweor+2Qxok7q7wD owi1guotqKnwmb0LsKmonexOPeI+yra9+hN+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708108298; x=1708713098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dVFjYg00n2ZAFDWX2JpqdHNuxugRyfOJfGbuxjDxV/Q=; b=vzAEpyDBZ1jmtWKlJ7/pYt9oDhRAEMB7wuJLmC+sgWzG5F6S4UlWp0w6tz3Cdb/MvJ zzC6LzNZOannRnVLbLLA5X69gZFOms3Js0jIl0/xmzA3tGi7izNwQ2x/DwxUIn9Kc/AV j8lENOACWC45iAg/i1R/Dm4GoBj6g4HjA1j3ZX0xS5pa8Cp8e8dKwjerT7yVfK/nndEB aQlHibMQ06LPsUwcH0C1PYYVBHBKuNq6QD4RGLdU1lCDTYkN3tz5iHLFeAWx7BJTdDGq w4I2zIRbzpqaYLT30z2OJMHCSkGJ8x/7E4f34tKqB5Bmilscc0OlUfwLTWCzXCfnG2hq E50g== X-Gm-Message-State: AOJu0Yw8UfvwLET/uoBhZgMTxhWg/NrzQXSXgPzzwLGWFThEn/JqrCL7 2nsuVvfukAvvDJ3v3clV0sT5vIve9H825i3rE3gjI/Hd2zUFWeydBIp+UyLkYlS64FS1+Ibt1wB 7 X-Received: by 2002:a05:6358:3384:b0:176:d46c:e704 with SMTP id i4-20020a056358338400b00176d46ce704mr6500262rwd.16.1708108298409; Fri, 16 Feb 2024 10:31:38 -0800 (PST) Received: from joelbox2.. (c-98-249-43-138.hsd1.va.comcast.net. [98.249.43.138]) by smtp.gmail.com with ESMTPSA id nd13-20020a056214420d00b0068cdadb5e7esm159722qvb.31.2024.02.16.10.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:31:37 -0800 (PST) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Cc: Suleiman Souhlal , Youssef Esmat , David Vernet , Thomas Gleixner , "Paul E . McKenney" , joseph.salisbury@canonical.com, Luca Abeni , Tommaso Cucinotta , Vineeth Pillai , Shuah Khan , Phil Auld , "Joel Fernandes (Google)" Subject: [PATCH 01/10] sched/core: Add clearing of ->dl_server in put_prev_task_balance() Date: Fri, 16 Feb 2024 13:30:59 -0500 Message-Id: <20240216183108.1564958-2-joel@joelfernandes.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216183108.1564958-1-joel@joelfernandes.org> References: <20240216183108.1564958-1-joel@joelfernandes.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Paths using put_prev_task_balance() need to do a pick shortly after. Make sure they also clear the ->dl_server on prev as a part of that. Signed-off-by: Joel Fernandes (Google) --- kernel/sched/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 973fd610d089..7f3a2596c1ed 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5998,6 +5998,14 @@ static void put_prev_task_balance(struct rq *rq, struct task_struct *prev, #endif put_prev_task(rq, prev); + + /* + * We've updated @prev and no longer need the server link, clear it. + * Must be done before ->pick_next_task() because that can (re)set + * ->dl_server. + */ + if (prev->dl_server) + prev->dl_server = NULL; } /* @@ -6041,14 +6049,6 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) restart: put_prev_task_balance(rq, prev, rf); - /* - * We've updated @prev and no longer need the server link, clear it. - * Must be done before ->pick_next_task() because that can (re)set - * ->dl_server. - */ - if (prev->dl_server) - prev->dl_server = NULL; - for_each_class(class) { p = class->pick_next_task(rq); if (p) -- 2.34.1