mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Joonwoo Park <joonwoop@codeaurora.org>
Cc: linux-kernel@vger.kernel.org,
	John Stultz <john.stultz@linaro.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v2 RESEND/RFC] timer: make deferrable cpu unbound timers really not bound to a cpu
Date: Tue, 23 Sep 2014 20:33:34 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1409231808110.4604@nanos> (raw)
In-Reply-To: <1410836376-27267-1-git-send-email-joonwoop@codeaurora.org>

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

  reply	other threads:[~2014-09-23 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16  2:59 Joonwoo Park
2014-09-23 18:33 ` Thomas Gleixner [this message]
2014-09-26 20:54   ` Joonwoo Park
2015-03-20  0:10   ` Saravana Kannan
2015-03-24 19:36     ` Saravana Kannan
2015-03-30 20:16       ` Joonwoo Park
2015-04-28  2:39       ` [PATCH 2/2] " Joonwoo Park
2015-04-28  2:41         ` Joonwoo Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1409231808110.4604@nanos \
    --to=tglx@linutronix.de \
    --cc=john.stultz@linaro.org \
    --cc=joonwoop@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®