Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932755AbXFGS2R (ORCPT ); Thu, 7 Jun 2007 14:28:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934511AbXFGS1x (ORCPT ); Thu, 7 Jun 2007 14:27:53 -0400 Received: from ms-smtp-01.nyroc.rr.com ([24.24.2.55]:41542 "EHLO ms-smtp-01.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933770AbXFGS1v (ORCPT ); Thu, 7 Jun 2007 14:27:51 -0400 Subject: [PATCH RT] convert RCU Preempt tasklet into softirq. From: Steven Rostedt To: paulmck@linux.vnet.ibm.com Cc: john stultz , Ingo Molnar , Thomas Gleixner , Oleg Nesterov , LKML , Dipankar Sarma , RT In-Reply-To: <20070607161754.GA11941@linux.vnet.ibm.com> References: <1181180051.18444.31.camel@localhost.localdomain> <20070607041411.GB1783@linux.vnet.ibm.com> <1181226138.18444.54.camel@localhost.localdomain> <20070607161754.GA11941@linux.vnet.ibm.com> Content-Type: text/plain Date: Thu, 07 Jun 2007 14:26:59 -0400 Message-Id: <1181240819.10408.14.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2393 Lines: 72 Following Dipankar's lead, I converted the tasklet in rcupreempt.c into a softirq. I've compiled and booted with this patch, but ran no other tests. Paul, I'm disappointed, this was so trivial I didn't get a chance to learn anything ;-) Signed-off-by: Steven Rostedt Index: linux-2.6.21-rt9/include/linux/rcupreempt.h =================================================================== --- linux-2.6.21-rt9.orig/include/linux/rcupreempt.h +++ linux-2.6.21-rt9/include/linux/rcupreempt.h @@ -63,7 +63,9 @@ extern void rcu_check_callbacks(int cpu, extern void rcu_restart_cpu(int cpu); extern long rcu_batches_completed(void); -extern void rcu_process_callbacks(unsigned long unused); +struct softirq_action; + +extern void rcu_process_callbacks(struct softirq_action *unused); #endif /* __KERNEL__ */ #endif /* __LINUX_RCUPREEMPT_H */ Index: linux-2.6.21-rt9/kernel/rcupreempt.c =================================================================== --- linux-2.6.21-rt9.orig/kernel/rcupreempt.c +++ linux-2.6.21-rt9/kernel/rcupreempt.c @@ -57,7 +57,6 @@ struct rcu_data { raw_spinlock_t lock; long completed; /* Number of last completed batch. */ - struct tasklet_struct rcu_tasklet; struct rcu_head *nextlist; struct rcu_head **nexttail; struct rcu_head *waitlist; @@ -255,7 +254,7 @@ void rcu_check_callbacks(int cpu, int us spin_unlock_irqrestore(&rcu_data.lock, oldirq); } else { spin_unlock_irqrestore(&rcu_data.lock, oldirq); - tasklet_schedule(&rcu_data.rcu_tasklet); + raise_softirq(RCU_SOFTIRQ); } } @@ -279,7 +278,7 @@ void rcu_advance_callbacks(int cpu, int spin_unlock_irqrestore(&rcu_data.lock, oldirq); } -void rcu_process_callbacks(unsigned long unused) +void rcu_process_callbacks(struct softirq_action *unused) { unsigned long flags; struct rcu_head *next, *list; @@ -367,7 +366,7 @@ void __init __rcu_init(void) rcu_data.waittail = &rcu_data.waitlist; rcu_data.donelist = NULL; rcu_data.donetail = &rcu_data.donelist; - tasklet_init(&rcu_data.rcu_tasklet, rcu_process_callbacks, 0UL); + open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL); } /* - 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/