Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2199547lqt; Mon, 22 Apr 2024 04:40:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXksc8Y2da+25QZ6WxaN7v9cVHcbJDGoBZ1pT84WaudfJ3DMCzAyvkoNPxQYOcr/10Tqwdm6SXJQboVhUtObqgYKou236qRX/iEvFbi0A== X-Google-Smtp-Source: AGHT+IG+sddyI2h8PFfP6ZPIN7VUftXo7D1I2uMqcBOVKdoSQWCaLv0df+ku/daGedI8EqmGzcmB X-Received: by 2002:a17:90a:840e:b0:2a6:43c:44c6 with SMTP id j14-20020a17090a840e00b002a6043c44c6mr7389060pjn.29.1713786038003; Mon, 22 Apr 2024 04:40:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713786037; cv=pass; d=google.com; s=arc-20160816; b=K1Npo4+E29gK9Ip7eHPNCSgyBdOjzLEOT6dGcZ6YiYSK77ltjbsoQY9VUxRRFb2bHp DbM0UBFEAJOarblG6UcO0rwD+Kf8jTPY6jMlOsDddMb3drRj2HjjjLNdf+ynueiu5EoS Qt8Z+KV1IV5xQc3Sj8k2DAXImB7gW3Ngq7cVGsA9RgoPQqWbRzF3dX2RBuTvNiYI9idM 40HPM5J/dGz75LwaO5dONz8IE5Dm4iEnxeMfWDRXGn/lvGb1P0X61nnbcVUZi+3a2uzU s9L2g/wsV/H9cDAgy+BkbkVdR4yJ4ZpzE0k2wtuLYPqtkEk5l6SQfyCxyqqLJ+EbetFI 7Tlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=8r76kTVR+OljXjJoSnTmhAtEL3qabccd9975h+qBfGk=; fh=qCB19EuPemh5c0E39kAv7UB9wvTqpTn2pbqcIu1knyM=; b=NDd+C1gcHY3MUbRPrloTE25PSEYI0SZzChOIvWEJmovzPtuyzeiGuyeq+24tdxRVuZ 8ctbR++1OJqAabDwm0WoTKtTWqHChLqN27poGEhVWGP79y4sKDeWG4zf2ksOEqLpHmRI 2rvSw3/9ZhW7F2LetkIiyLLoykFxa/bY7ZEqvKvujFE/xrSLFJagza6a0u0Wg18X/NpN NXD7PHn0Y5Fb0bH1pvu9rsN8Ny8EP5lBKgelHTXdh5mfVIq8TOles3tLNCPNfHenhjVd 4gBjqybN+Wbceg3P+vIha4U1TZmidUCyrw0NhnKmlzr7JiGGYo/thnPoKGZJvCfUlKAX DfPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iiosEHvP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-153299-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l17-20020a17090b079100b002adcf21fc12si1740680pjz.120.2024.04.22.04.40.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 04:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153299-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=@linutronix.de header.s=2020 header.b=iiosEHvP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-153299-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 207292858DB for ; Mon, 22 Apr 2024 11:39:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5617B1474B4; Mon, 22 Apr 2024 11:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iiosEHvP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6Pzi0HoB" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 14A831465B7; Mon, 22 Apr 2024 11:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713785978; cv=none; b=ckRdfWDRNnJfAPad2XhTFQ3asyd3rRZjClK017aAw7PrVNrlWUWrmgtZ24y3tzl8WJxg2yxxu9r8juwOenT1b0UtNV9hCJuZhzQCDCrxNjBHpU+tojHoyU3PV2x/3egGouMt2bCp58jrPXlJJFmbRs3vvRqb6ewpUjjheQaWVR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713785978; c=relaxed/simple; bh=EECRdzowpEowAZmGlguCc5GjAUJG1EYPm0MDp3czuVc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fdcf++GymkvMk73PmPkN5KJApRrhJBhYFjSoWIb0rBquVuUVYi9BBof68QRoKqyeoVMtUAjUarcfdSStd+r5IEkANFW1dkJ3HSmkkSCWlFr3ODU2y4r6IHWkb1A/wcWiWK86nzNCXh80Gihd1+WdXrD8xwH8NxoOwtMSobsw2N8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iiosEHvP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6Pzi0HoB; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 22 Apr 2024 11:39:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713785975; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8r76kTVR+OljXjJoSnTmhAtEL3qabccd9975h+qBfGk=; b=iiosEHvPG81o3IXDT0KKHSwigbsI1Al3NINAAhGi69OVfoB8LQZAnx2FsQbTKgF6VWlA3y vR4OInI7NlMnVRs6PwApvuxbPooBK1mfLB1mV28mfPhSwFw13d1Ub6gFJUY6beMdJtHje+ IpA01ShfpwD/lywGUkmlt7UfZ6fM59zQ+3cGtjeHv1CcXj7iLWVuvJtwEtPBlntqybHFbi wrJM8554QMFXbpi9YQzM6A2CCas6VrL6l+AUehfQZLYR2k0UeD4a9JkaDH8BC/idHYiIoV p4O2rEpdqLreIgBZgtSrO4hXJuiLAhyP1WtsqwCIUTW589IBBuxQ4JLAICg0hQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713785975; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8r76kTVR+OljXjJoSnTmhAtEL3qabccd9975h+qBfGk=; b=6Pzi0HoBb0ENZ6XjuhGlt7jTdjgxi83pvqRlq3IzRn+mPpHUYodS44PI1Ey0lTBJGTD8ym 2bkwVpXnnk2aA/CQ== From: "tip-bot2 for Tianchen Ding" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/eevdf: Always update V if se->on_rq when reweighting Cc: Abel Wu , Tianchen Ding , "Peter Zijlstra (Intel)" , K Prateek Nayak , Chen Yu , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240306022133.81008-2-dtcccc@linux.alibaba.com> References: <20240306022133.81008-2-dtcccc@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171378597469.10875.9133852696892913685.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 11b1b8bc2b98e21ddf47e08b56c21502c685b2c3 Gitweb: https://git.kernel.org/tip/11b1b8bc2b98e21ddf47e08b56c21502c685b2c3 Author: Tianchen Ding AuthorDate: Wed, 06 Mar 2024 10:21:32 +08:00 Committer: Peter Zijlstra CommitterDate: Mon, 22 Apr 2024 13:01:26 +02:00 sched/eevdf: Always update V if se->on_rq when reweighting reweight_eevdf() needs the latest V to do accurate calculation for new ve and vd. So update V unconditionally when se is runnable. Fixes: eab03c23c2a1 ("sched/eevdf: Fix vruntime adjustment on reweight") Suggested-by: Abel Wu Signed-off-by: Tianchen Ding Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Abel Wu Tested-by: K Prateek Nayak Tested-by: Chen Yu Link: https://lore.kernel.org/r/20240306022133.81008-2-dtcccc@linux.alibaba.com --- kernel/sched/fair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 03be0d1..5551ce2 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3790,9 +3790,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, if (se->on_rq) { /* commit outstanding execution time */ - if (curr) - update_curr(cfs_rq); - else + update_curr(cfs_rq); + if (!curr) __dequeue_entity(cfs_rq, se); update_load_sub(&cfs_rq->load, se->load.weight); }