From: Frederic Weisbecker <frederic@kernel.org>
To: Alex Shi <seakeel@gmail.com>
Cc: alexs@kernel.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Waiman Long <longman@redhat.com>
Subject: Re: [PATCH 2/4] sched/isolation: clean up housekeeping_cpu
Date: Fri, 11 Apr 2025 13:08:12 +0200 [thread overview]
Message-ID: <Z_j4HIVRUcF-TwDP@pavilion.home> (raw)
In-Reply-To: <CAJy-Am=oORjnBx09phsBCkNxF+bK_CyWA_eBMHUG0WdE9pb63A@mail.gmail.com>
Le Fri, Apr 11, 2025 at 08:58:45AM +0800, Alex Shi a écrit :
> Frederic Weisbecker <frederic@kernel.org> 于2025年4月10日周四 21:20写道:
> >
> > Le Thu, Apr 10, 2025 at 05:24:17PM +0800, alexs@kernel.org a écrit :
> > > From: Alex Shi <alexs@kernel.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
next prev parent reply other threads:[~2025-04-11 11:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 9:24 [PATCH 1/4] tick/nohz: remove function tick_nohz_full_add_cpus_to alexs
2025-04-10 9:24 ` [PATCH 2/4] sched/isolation: clean up housekeeping_cpu alexs
2025-04-10 13:20 ` Frederic Weisbecker
2025-04-11 0:58 ` Alex Shi
2025-04-11 11:08 ` Frederic Weisbecker [this message]
2025-04-10 9:24 ` [PATCH 3/4] sched/isolation: merge housekeeping_cpu() and housekeeping_test_cpu() alexs
2025-04-10 9:24 ` [PATCH 4/4] sched/isolation: don't alloc twice for housekeeping.cpumasks alexs
2025-05-13 14:49 ` [tip: timers/core] tick/nohz: Remove unused tick_nohz_full_add_cpus_to() tip-bot2 for Alex Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_j4HIVRUcF-TwDP@pavilion.home \
--to=frederic@kernel.org \
--cc=alexs@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=peterz@infradead.org \
--cc=seakeel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.