From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0201822CBE6 for ; Mon, 23 Feb 2026 13:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771852198; cv=none; b=Uo0b5WcCVZU4unArAY9vqVQzDwiVFhWSbc4CsfaQyNXYCcyR2nyf7bWY3Tzuvpaq612PwP3dt/AY/ESupZylPZrTt77ZV5N8ElCGOZ9BqrDZSbKXJJ/m3YXakKHekAx2ErkevzRkZ1+Kydc2MjDic2RglXAxC+bf6LTSW6BJUek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771852198; c=relaxed/simple; bh=DlVjVeV9r3St4yUke0jIfyBM3S17SqgxGxx4FhljaAk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qikO0NlpjmI36wH+5wQ+1Qmcufb85w3TvbqE4g88Cv8f5IUo03E9yH26GpymNMMcAJTCzBcATa7tiB4KKGVpEhkDt4fDSut9KZNkZYKWGWKU2n1HjroDnzNb7DbN6eaMiT8MMwFj4WzRsnBUWoVs5/zSIzeFCsMXFGSYspgz5w0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F1700339; Mon, 23 Feb 2026 05:09:49 -0800 (PST) Received: from [10.57.71.137] (unknown [10.57.71.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E0D053F59E; Mon, 23 Feb 2026 05:09:53 -0800 (PST) Message-ID: Date: Mon, 23 Feb 2026 14:09:52 +0100 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 v2 1/7] sched/fair: Fix zero_vruntime tracking To: Peter Zijlstra , mingo@kernel.org Cc: juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, wangtao554@huawei.com, quzicheng@huawei.com, kprateek.nayak@amd.com, dsmythies@telus.net, shubhang@os.amperecomputing.com References: <20260219075840.162631716@infradead.org> <20260219080624.438854780@infradead.org> Content-Language: en-GB From: Dietmar Eggemann In-Reply-To: <20260219080624.438854780@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 19.02.26 08:58, Peter Zijlstra wrote: > It turns out that zero_vruntime tracking is broken when there is but a single > task running. Current update paths are through __{en,de}queue_entity(), and > when there is but a single task, pick_next_task() will always return that one > task, and put_prev_set_next_task() will end up in neither function. Tried hard but I don't get the last clause. [...] > While there, optimize avg_vruntime() by noting that the average of one value is > rather trivial to compute. > nitpick: > Test case: > # taskset -c -p 1 $$ > # taskset -c 2 bash -c 'while :; do :; done&' > # cat /sys/kernel/debug/sched/debug | awk '/^cpu#/ {P=0} /^cpu#2,/ {P=1} {if (P) print $0}' | grep -e zero_vruntime -e "^>" ^ | Works only w/o this comma for me. [...]