From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
Michal Svec <msvec@suse.com>,
"David S. Miller" <davem@davemloft.net>,
Hayes Wang <hayeswang@realtek.com>,
Thierry Reding <treding@nvidia.com>,
Lee Jones <lee.jones@linaro.org>, Borislav Petkov <bp@alien8.de>,
LKML <linux-kernel@vger.kernel.org>,
Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [PATCH RFC] r8152: Ensure that napi_schedule() is handled
Date: Sat, 15 May 2021 21:06:01 +0200 [thread overview]
Message-ID: <87k0nz24x2.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210515130926.GC21560@worktop.programming.kicks-ass.net>
On Sat, May 15 2021 at 15:09, Peter Zijlstra wrote:
> On Sat, May 15, 2021 at 01:23:02AM +0200, Thomas Gleixner wrote:
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -691,7 +691,9 @@ void flush_smp_call_function_from_idle(v
>> cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->idle, CFD_SEQ_NOCPU,
>> smp_processor_id(), CFD_SEQ_IDLE);
>> local_irq_save(flags);
>> + lockdep_set_softirq_raise_safe();
>> flush_smp_call_function_queue(true);
>> + lockdep_clear_softirq_raise_safe();
>> if (local_softirq_pending())
>> do_softirq();
>
> I think it might make more sense to raise hardirq_count() in/for
> flush_smp_call_function_queue() callers that aren't already from hardirq
> context. That's this site and smpcfd_dying_cpu().
>
> Then we can do away with this new special case.
Right.
Though I just checked smpcfd_dying_cpu(). That ones does not run
softirqs after flushing the function queue and it can't do that because
that's in the CPU dying phase with interrupts disabled where the CPU is
already half torn down.
Especially as softirq processing enables interrupts, which might cause
even more havoc.
Anyway how is it safe to run arbitrary functions there after the CPU
removed itself from the online mask? That's daft to put it mildly.
Thanks,
tglx
prev parent reply other threads:[~2021-05-15 19:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 10:17 [PATCH RFC] r8152: Ensure that napi_schedule() is handled Thomas Gleixner
2021-05-14 19:38 ` Jakub Kicinski
2021-05-14 20:25 ` Thomas Gleixner
2021-05-14 20:46 ` Jakub Kicinski
2021-05-14 21:10 ` Thomas Gleixner
2021-05-14 21:41 ` Jakub Kicinski
2021-05-14 23:23 ` Thomas Gleixner
2021-05-14 23:36 ` Jakub Kicinski
2021-05-15 13:09 ` Peter Zijlstra
2021-05-15 19:06 ` Thomas Gleixner [this message]
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=87k0nz24x2.ffs@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=kuba@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=msvec@suse.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=treding@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).