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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 23 Sep 2014 20:33:34 +0200 (CEST) From: Thomas Gleixner <tglx@...utronix.de> To: Joonwoo Park <joonwoop@...eaurora.org> cc: linux-kernel@...r.kernel.org, John Stultz <john.stultz@...aro.org>, Tejun Heo <tj@...nel.org> Subject: Re: [PATCH v2 RESEND/RFC] timer: make deferrable cpu unbound timers really not bound to a cpu On Mon, 15 Sep 2014, Joonwoo Park wrote: > +#ifdef CONFIG_SMP > +static struct tvec_base *tvec_base_deferral = &boot_tvec_bases; > +#endif In principle I like the idea of a deferrable wheel, but this implementation is going to go nowhere. First of all making it SMP only is silly. The deferrable stuff is a pain in other places as well. But whats way worse is: > +static inline void __run_timers(struct tvec_base *base, bool try) > { > struct timer_list *timer; > > - spin_lock_irq(&base->lock); > + if (!try) > + spin_lock_irq(&base->lock); > + else if (!spin_trylock_irq(&base->lock)) > + return; Yuck. All cpus fighting about a single spinlock roughly at the same time? You just created a proper thundering herd cacheline bouncing issue. No way. We have already mechanisms in place to deal with such problems, you just have to use them. Thanks, tglx -- 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