From: Eric Dumazet <dada1@cosmosbay.com>
To: Dimitri Sivanich <sivanich@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@elte.hu,
roe@sgi.com, steiner@sgi.com, clameter@sgi.com
Subject: Re: [PATCH] Call get_time() only when necessary in run_hrtimer_queue
Date: Tue, 28 Mar 2006 19:39:08 +0200 [thread overview]
Message-ID: <442974BC.30304@cosmosbay.com> (raw)
In-Reply-To: <20060328165127.GC10411@sgi.com>
Dimitri Sivanich a écrit :
>
> The hrtimer work in -mm does improve on the situation, although there
> appears to be some occasional cache line contention for xtime. The
> following patch (which is similiar to my previously submitted patch)
> is applicable to 2.6.16-mm1 and does take care of at least a good
> portion of that.
I am not sure your patch is correct.
>
> Index: linux/kernel/hrtimer.c
> ===================================================================
> --- linux.orig/kernel/hrtimer.c 2006-03-27 09:43:40.000000000 -0600
> +++ linux/kernel/hrtimer.c 2006-03-27 12:35:47.416054373 -0600
> @@ -604,14 +604,17 @@ int hrtimer_get_res(const clockid_t whic
> */
> static inline void run_hrtimer_queue(struct hrtimer_base *base)
> {
> - struct rb_node *node;
> + struct rb_node *node = base->first;
> +
> + if (!node)
> + return;
>
> if (base->get_softirq_time)
> base->softirq_time = base->get_softirq_time();
>
> spin_lock_irq(&base->lock);
>
> - while ((node = base->first)) {
> + while (node) {
Are you sure of this change ?
base->first may have changed just before you locked the base->lock
(spin_lock_irq(&base->lock);)
Eric
next prev parent reply other threads:[~2006-03-28 17:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 17:51 [PATCH] Call get_time() only when necessary in run_hrtimer_queue Dimitri Sivanich
2006-03-24 22:28 ` Andrew Morton
2006-03-25 7:01 ` Thomas Gleixner
2006-03-28 16:51 ` Dimitri Sivanich
2006-03-28 17:39 ` Eric Dumazet [this message]
2006-03-28 17:55 ` Dimitri Sivanich
2006-03-28 19:20 ` Thomas Gleixner
2006-03-28 20:14 ` [PATCH] Call get_softirq_time() only when necessary in run_hrtimer_queue() Dimitri Sivanich
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=442974BC.30304@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roe@sgi.com \
--cc=sivanich@sgi.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
/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