[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_j4HIVRUcF-TwDP@pavilion.home>
Date: Fri, 11 Apr 2025 13:08:12 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Alex Shi <seakeel@...il.com>
Cc: alexs@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Waiman Long <longman@...hat.com>
Subject: Re: [PATCH 2/4] sched/isolation: clean up housekeeping_cpu
Le Fri, Apr 11, 2025 at 08:58:45AM +0800, Alex Shi a écrit :
> Frederic Weisbecker <frederic@...nel.org> 于2025年4月10日周四 21:20写道:
> >
> > Le Thu, Apr 10, 2025 at 05:24:17PM +0800, alexs@...nel.org a écrit :
> > > From: Alex Shi <alexs@...nel.org>
> > >
> > > housekeeping_test_cpu will check 'housekeeping_overridden' again in
> > > itself so we don't need do it again outside. just call
> > > housekeeping_test_cpu is fine.
> >
> > The point is to do it in the headers, so there is no function
> > call in the off case.
>
> Thanks for comments, Frederic,
> But the function is 'inline', and further more, the
> CONFIG_CPU_ISOLATION is in defconfig
> and most of puplar popular Linux vendor. So it still be compiled.
housekeeping_cpu() is inline and does the static branch test, which is
most of the time off. If it's on, then we enter the slow path and call
the real function housekeeping_test_cpu().
So the point is to optimize the fast path, which 99.999% of the uses
since nohz_full is a rare workload.
But housekeeping_test_cpu() is still built on most distros just in case
a distro user ever needs nohz_full.
Thanks.
--
Frederic Weisbecker
SUSE Labs
Powered by blists - more mailing lists