[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221008003826.GA6663@ranerica-svr.sc.intel.com>
Date: Fri, 7 Oct 2022 17:38:26 -0700
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Ricardo Neri <ricardo.neri@...el.com>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Len Brown <len.brown@...el.com>, Mel Gorman <mgorman@...e.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Valentin Schneider <vschneid@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, "Tim C . Chen" <tim.c.chen@...el.com>
Subject: Re: [RFC PATCH 18/23] sched/task_struct: Add helpers for task
classification
On Tue, Sep 27, 2022 at 01:52:24PM +0200, Peter Zijlstra wrote:
> On Fri, Sep 09, 2022 at 04:12:00PM -0700, Ricardo Neri wrote:
>
> > #ifdef CONFIG_SCHED_TASK_CLASSES
> > short class;
> > + short class_candidate;
> > + char class_debounce_counter;
> > #endif
>
> That's 5 bytes; is that really needed? 4 would be so much better :-)
It can probably be implemented as:
u32 class : 9,
class_candidate : 9,
class_debounce_counter : 14;
9 bits accommodate the 256 possible classes + 'unclassified' that the
existing hardware can support (I doubt there will ever be this many
classes). The remainder bits can be used for debouncing, or even have
some reserved for future use.
Thanks and BR,
Ricardo
Powered by blists - more mailing lists