lkml.org 
[lkml]   [2006]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Help with 2.6.10 concurrency issue
martin rogers wrote:
> Problem is, the function writeList can be called from a H/W intr,
> and a workqueue (and that intr could of course happen while either
> the workqueue or the tasklet is running, right?).
>
> If I use spin_lock_irqsave in writeList, it protects against the intr
> but not the tasklet.

Yes, it protects against the tasklet as well. Disabling interrupts also
implicity disables BH execution (tasklets).

If I use spin_lock_bh, I don't get protection
> from the intr I think; plus, I get :
>
> Badness in local_bh_enable at kernel/softirq.c:142
>
> when the intr runs (what does this mean?).

It means you're enabling BHs when interrupts are disabled, which doesn't
make any sense. You can't use spin_lock_bh/spin_unlock_bh when
interrupts are disabled.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-10 01:49    [W:0.027 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site