lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201028143826.GB2628@hirez.programming.kicks-ass.net>
Date:   Wed, 28 Oct 2020 15:38:26 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org, will@...nel.org,
        paulmck@...nel.org, hch@....de, axboe@...nel.dk,
        chris@...is-wilson.co.uk, davem@...emloft.net, kuba@...nel.org,
        fweisbec@...il.com, oleg@...hat.com, vincent.guittot@...aro.org
Subject: Re: [PATCH v3 5/6] irq_work: Provide irq_work_queue_remote()

On Wed, Oct 28, 2020 at 02:40:46PM +0100, Frederic Weisbecker wrote:
> On Wed, Oct 28, 2020 at 12:07:12PM +0100, Peter Zijlstra wrote:
> > While the traditional irq_work relies on the ability to self-IPI, it
> > makes sense to provide an unconditional irq_work_queue_remote()
> > interface.
> 
> We may need a reason as well here.

Well, it doesn't rely on arch self-IPI code. The remote irq_work bits
are generic SMP code.

> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -1308,13 +1308,14 @@ static int rcu_implicit_dynticks_qs(stru
> >  			resched_cpu(rdp->cpu);
> >  			WRITE_ONCE(rdp->last_fqs_resched, jiffies);
> >  		}
> > -		if (IS_ENABLED(CONFIG_IRQ_WORK) &&
> > -		    !rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq &&
> > +#ifdef CONFIG_IRQ_WORK
> > +		if (!rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq &&
> 
> If it's unconditional on SMP, I expect it to be unconditional on rcutree.
> 
> Also this chunk seems unrelated to this patch.

This hunk is due to irq_work_queue_on() no longer existing for
CONFIG_IRQ_WORK and hence breaking the compile with that IS_ENABLED()
crud.

That is, this changes IS_ENABLED() for a proper #ifdef.

> >  		    (rnp->ffmask & rdp->grpmask)) {
> >  			rdp->rcu_iw_pending = true;
> >  			rdp->rcu_iw_gp_seq = rnp->gp_seq;
> >  			irq_work_queue_on(&rdp->rcu_iw, rdp->cpu);
> >  		}
> > +#endif
> >  	}
> >  
> >  	return 0;
> > 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ