lkml.org 
[lkml]   [2014]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2014-09-04 16:01    [W:1.568 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site