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: <20140904133337.GA1771@lerouge>
Date:	Thu, 4 Sep 2014 15:33:40 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Catalin Iacob <iacobcatalin@...il.com>,
	Dave Jones <davej@...hat.com>, Ingo Molnar <mingo@...nel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 3/9] irq_work: Force raised irq work to run on irq
 work interrupt

On Thu, Sep 04, 2014 at 08:11:37AM +0200, Peter Zijlstra wrote:
> On Thu, Aug 21, 2014 at 04:52:51PM +0200, Frederic Weisbecker wrote:
> > diff --git a/kernel/irq_work.c b/kernel/irq_work.c
> > index e6bcbe7..17bd203 100644
> > --- a/kernel/irq_work.c
> > +++ b/kernel/irq_work.c
> > @@ -22,6 +22,7 @@
> >  
> >  static DEFINE_PER_CPU(struct llist_head, raised_list);
> >  static DEFINE_PER_CPU(struct llist_head, lazy_list);
> > +static bool has_own_interrupt;
> >  
> >  /*
> >   * Claim the entry so that no one else will poke at it.
> 
> > +void irq_work_tick(void)
> > +{
> > +	if (!has_own_interrupt)
> > +		irq_work_run_list(&__get_cpu_var(raised_list));
> > +	irq_work_run_list(&__get_cpu_var(lazy_list));
> > +}
> > +
> >  /*
> >   * Synchronize against the irq_work @entry, ensures the entry is not
> >   * currently in use.
> 
> Why not something like the below; then it becomes a compile time matter.

Problem is that some archs only have that information at runtime.
See x86 for example which tests cpu_has_apic.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ