lkml.org 
[lkml]   [2013]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] irq_work: Provide a irq work that can be processed on any cpu
On Thu 07-11-13 18:31:42, Steven Rostedt wrote:
> On Fri, 8 Nov 2013 00:01:11 +0100
> Jan Kara <jack@suse.cz> wrote:
>
> > On Thu 07-11-13 23:54:10, Frederic Weisbecker wrote:
>
> > > So if the current CPU can handle it, what is the problem?
> > I hope this gets cleared out in my other email. But to make sure: If
> > other CPUs are idle (i.e. not appending to the printk buffer), we can well
> > handle the printing on the current CPU (with some breaks to allow
> > interrupts to be served etc.). If other CPUs are also appending to printk
> > buffer, that's where we really want to push the work to other CPUs.
>
> I guess the question is, how does it migrate? I guess that's not so
> clear. Or do you just hope that the timer tick on another CPU will come
> in first and finish the job for you? As the list is global and all CPUs
> get to see it.
There are two possibilities how the migration can happen:
1) a tick happens first on some other cpu and thus it will pick up the work
2) a printk happens first on some other cpu and thus it will pick printing
in its console_unlock() call.

I agree in both cases we depend on statistics, there's no real guarantee
the migration happens. But in my testing this seems to be enough.

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2013-11-08 11:41    [W:0.036 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site