Re: [PATCH 10/10] softirq: Remove __ARCH_SET_SOFTIRQ_PENDING

From: Frederic Weisbecker
Date: Thu Mar 29 2018 - 12:56:01 EST


On Thu, Mar 29, 2018 at 04:53:43PM +0200, Martin Schwidefsky wrote:
> On Thu, 29 Mar 2018 16:07:49 +0200
> Frederic Weisbecker <frederic@xxxxxxxxxx> wrote:
>
> > On Thu, Mar 29, 2018 at 04:01:11PM +0200, Peter Zijlstra wrote:
> > > On Thu, Mar 29, 2018 at 03:47:46PM +0200, Frederic Weisbecker wrote:
> > > > On Thu, Mar 29, 2018 at 09:16:19AM +0200, Peter Zijlstra wrote:
> > > > > On Thu, Mar 29, 2018 at 04:27:05AM +0200, Frederic Weisbecker wrote:
> > > > > > The last user of __ARCH_SET_SOFTIRQ_PENDING has been converted to generic
> > > > > > per-cpu softirq mask. We can now remove this conditional.
> > > > >
> > > > > This seems like half a cleanup; who still has local_softirq_pending()
> > > > > after this?
> > > >
> > > > Only s390 because it uses lowcore to store such cpu data.
> > >
> > > Is it worth keeping it there? It seems an aweful shame to keep this
> > > stuff special cased for just the one arch. At the very least this
> > > should've mentioned s390 is special and why.
> >
> > Right, I thought well about moving that special case to s390. I can
> > do that in v2.
>
> The lowcore optimization for softirq_pending field is not really needed,
> just nice to have. But if there is a strong reason to make a common
> definition for it we can certainly do that.

I think there is no need to. Lowcore is faster to access than per-cpu on s390
and we are dealing with a frequently accessed field. Plus lowcore is expected to
be often cache-hot.

But Peter is right that I should move the default implementation of
or_softirq_pending() and set_softirq_pending() to s390 as it's the last
user of these after this patchset.

Thanks.