lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070607210247.GA9390@linux.vnet.ibm.com>
Date:	Thu, 7 Jun 2007 14:02:47 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	john stultz <johnstul@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oleg Nesterov <oleg@...sign.ru>,
	LKML <linux-kernel@...r.kernel.org>,
	Dipankar Sarma <dipankar@...ibm.com>,
	RT <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH RT] convert RCU Preempt tasklet into softirq.

On Thu, Jun 07, 2007 at 02:26:59PM -0400, Steven Rostedt wrote:
> 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.

I should be able to run rcutorture on it.

> Paul,  I'm disappointed, this was so trivial I didn't get a chance to
> learn anything ;-)

;-)

Some nits below.

						Thanx, Paul

> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> 
> 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);

I don't understand why the above is needed -- interrupt.h is included,
and the use of rcu_process_callbacks() follows the definition.

>  #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-rt-users" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ