[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] tasklet: Add lock-free exit path from do_tasklet() when no work to do.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1271770373 -3600 # Node ID dbf0fd95180f97bdf403ada605400723e4e8563d # Parent b2c56f91da8d34e4daf4cceb1fc8a70a33656ae2 tasklet: Add lock-free exit path from do_tasklet() when no work to do. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/common/tasklet.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -r b2c56f91da8d -r dbf0fd95180f xen/common/tasklet.c --- a/xen/common/tasklet.c Tue Apr 20 07:54:47 2010 +0100 +++ b/xen/common/tasklet.c Tue Apr 20 14:32:53 2010 +0100 @@ -60,9 +60,12 @@ void do_tasklet(void) struct list_head *list = &per_cpu(tasklet_list, cpu); struct tasklet *t; + if ( likely(list_empty(list)) ) + return; + spin_lock_irq(&tasklet_lock); - if ( list_empty(list) ) + if ( unlikely(list_empty(list)) ) { spin_unlock_irq(&tasklet_lock); return; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |