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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080902061806.GJ18288@one.firstfloor.org>
Date:	Tue, 2 Sep 2008 08:18:06 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	cl@...ux-foundation.org, mingo@...e.hu, akpm@...ux-foundation.org,
	manfred@...orfullife.com, dipankar@...ibm.com,
	josht@...ux.vnet.ibm.com, schamp@....com, niv@...ibm.com,
	dvhltc@...ibm.com, ego@...ibm.com, laijs@...fujitsu.com,
	rostedt@...dmis.org, peterz@...radead.org
Subject: Re: [PATCH, RFC, tip/core/rcu] v3 scalable classic RCU implementation

> > It would be better if you hung rcu_irq_enter in the irq_enter() if 
> > statement that checks if the task was idle or not. This way it would
> > be zero overhead for interruptions of non busy CPUs, keeping 

Sorry that should have been "non idle CPUs" of course.

> > it out of many fast paths.
> > 
> > Haven't read everything, sorry.
> 
> So that I lose the #else above, and so that irq_enter() and irq_exit()
> look something like the following (with additional adjustments to suit)?

Yes looks good.

BTW I wonder if the compiler CSEs the idle_cpu() check properly.

> void irq_enter(void)
> {
> #ifdef CONFIG_NO_HZ
> 	int cpu = smp_processor_id();
> 	if (idle_cpu(cpu) && !in_interrupt())
> 		tick_nohz_stop_idle(cpu);
> #endif
> 	__irq_enter();
> #ifdef CONFIG_NO_HZ
> 	if (idle_cpu(cpu)) {
> 		rcu_irq_enter();
> 		tick_nohz_update_jiffies();
> 	}
> #endif


-Andi
--
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