From mboxrd@z Thu Jan 1 00:00:00 1970 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 CDE693C17 for ; Mon, 1 Dec 2025 08:06:29 +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=1764576389; cv=none; b=L5YHDmikzHMRrZ3fcYCKzdhaet8wLX9gEDcxXLYOwWxK4mnLCNTbv6qFmXC87pk02q1agZqzHI2WPlUXa5BAeErneCD6D4BWMrifeHNl4lXotLrpKc2R52qMSAQkd56Og5J7TzmZBZS82zEY2fHfAoAuC7KV9/1dWf4rWWpAU/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764576389; c=relaxed/simple; bh=pQcmrM4VtfxrbxVwlvp8IOdT3sB9iOgM/FvarXT5CnU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VnwwoI9byXPB4lky8lQlZ+azCvLvUgCMKgJiBx6wVzD5ejbkQ2XAO9gu5Pq2uD4lV3cTh+xHUxu/Qse5FcPiCimCuRXUp9Mt3usXceKA4O6tFr5SJUrqpHAr30yQoMSquYgGqLP5YZ2x/i4FrL/+HwIdIjjK3K4pQy1Ch9PHYG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L60sLgAV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L60sLgAV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9601C4CEF1; Mon, 1 Dec 2025 08:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764576389; bh=pQcmrM4VtfxrbxVwlvp8IOdT3sB9iOgM/FvarXT5CnU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L60sLgAVc14ongyuL+MO/3J+m99kuXozlZC2vMQNppYGIgV3gacSKLgswC/79gANn IYWGLeQMOXkp8SADgsc+ss1WwxFATdQUQYnvfF2LmnuteUXCLxEeIucWTn/KvAVO68 seXBZQGBc7Ls+DSKznvLSnhUq/Vah+kEMXUa22uMXMbbLMUC3O8Qv+Y1rZo6CaAPuG p/VpmAuapCwbCCCSr309hgFfmH7bnTvD68jGen3Cux4JvkH3pwhyguzqvjhlth8NvH mfIgzJh9amK+J80mQkfEoZEI90/yaD40Ec19C3CznTntftpEADnd/XmLgoTw7ak4/o i65eFkU2iuo+A== Date: Mon, 1 Dec 2025 09:06:24 +0100 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Valentin Schneider , Vincent Guittot , Shrikanth Hegde , Linus Torvalds , Mel Gorman , Steven Rostedt , Thomas Gleixner Subject: [PATCH 3/6 v2] sched/fair: Separate se->vlag from se->vprot Message-ID: References: <20251201064647.1851919-1-mingo@kernel.org> <20251201064647.1851919-4-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251201064647.1851919-4-mingo@kernel.org> * Ingo Molnar wrote: > There's no real space concerns here and keeping these fields > in a union makes reading (and tracing) the scheduler code harder. > > Signed-off-by: Ingo Molnar > --- > include/linux/sched.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index e84bc5bce816..667fa08aee75 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -586,7 +586,7 @@ struct sched_entity { > u64 sum_exec_runtime; > u64 prev_sum_exec_runtime; > u64 vruntime; > - union { > +// union { > /* > * When !@on_rq this field is vlag. > * When cfs_rq->curr == se (which implies @on_rq) > @@ -594,7 +594,7 @@ struct sched_entity { > */ > s64 vlag; > u64 vprot; > - }; > +// }; > u64 slice; > > u64 nr_migrations; Of course I meant the patch below. :-/ Thanks, Ingo ===================================> From: Ingo Molnar Date: Wed, 26 Nov 2025 05:31:28 +0100 Subject: [PATCH] sched/fair: Separate se->vlag from se->vprot There's no real space concerns here and keeping these fields in a union makes reading (and tracing) the scheduler code harder. Signed-off-by: Ingo Molnar --- include/linux/sched.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index e84bc5bce816..9aa38dc37b09 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -586,15 +586,10 @@ struct sched_entity { u64 sum_exec_runtime; u64 prev_sum_exec_runtime; u64 vruntime; - union { - /* - * When !@on_rq this field is vlag. - * When cfs_rq->curr == se (which implies @on_rq) - * this field is vprot. See protect_slice(). - */ - s64 vlag; - u64 vprot; - }; + /* Approximated virtual lag: */ + s64 vlag; + /* 'Protected' deadline, to give out minimum quantums: */ + u64 vprot; u64 slice; u64 nr_migrations;