Messages in this thread | | | Date | Wed, 25 Oct 2023 10:04:46 -0400 | Subject | Re: [RFC PATCH v2 1/2] sched/fair: Introduce UTIL_FITS_CAPACITY feature (v2) | From | Mathieu Desnoyers <> |
| |
On 2023-10-25 03:56, Peter Zijlstra wrote: > On Thu, Oct 19, 2023 at 12:05:22PM -0400, Mathieu Desnoyers wrote: > >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h >> index e93e006a942b..463e75084aed 100644 >> --- a/kernel/sched/sched.h >> +++ b/kernel/sched/sched.h >> @@ -2090,6 +2090,11 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features = >> >> #endif /* SCHED_DEBUG */ >> >> +static __always_inline bool sched_util_fits_capacity_active(void) >> +{ >> + return sched_feat(UTIL_EST) && sched_feat(UTIL_FITS_CAPACITY); >> +} > > This generates pretty terrible code; it cannot collapse this into a > single branch. And since sched_feat is at best a debug interface for > people who knows wtf they're doing, just make this UTIL_FITS_CAPACITY > with a comment or so.
OK, change applied for the next round, thanks!
Mathieu
-- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com
| |