[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230531050859.218a6632@rorschach.local.home>
Date: Wed, 31 May 2023 05:08:59 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/alternatives: Add cond_resched() to
text_poke_bp_batch()
On Tue, 30 May 2023 14:01:48 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> > diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> > index f615e0cb6d93..e024eddd457f 100644
> > --- a/arch/x86/kernel/alternative.c
> > +++ b/arch/x86/kernel/alternative.c
> > @@ -1953,6 +1953,14 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
> > */
> > atomic_set_release(&bp_desc.refs, 1);
> >
> > + /*
> > + * Function tracing can enable thousands of places that need to be
> > + * updated. This can take quite some time, and with full kernel debugging
> > + * enabled, this could cause the softlockup watchdog to trigger.
> > + * Add cond_resched() calls to each phase.
> > + */
> > + cond_resched();
>
> But but but... you can only have TP_VEC_MAX pokes queued, which is 256
> on normal setups.
>
> Please explain how this leads to problems and why you need _3_
> reschedule points here.
I removed all but this first one and it works fine.
I'll resend with the update.
-- Steve
Powered by blists - more mailing lists