From: Thomas Gleixner <tglx@linutronix.de>
To: Dimitri Sivanich <sivanich@sgi.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, john stultz <johnstul@us.ibm.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2] Move calc_load call out from xtime_lock protection
Date: Sat, 11 Apr 2009 18:53:45 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0904111849450.21577@localhost.localdomain> (raw)
In-Reply-To: <20090411162416.GC3496@sgi.com>
On Sat, 11 Apr 2009, Dimitri Sivanich wrote:
> On Sat, Apr 11, 2009 at 11:51:36AM +0200, Thomas Gleixner wrote:
> > On Fri, 10 Apr 2009, Dimitri Sivanich wrote:
> >
> > > The xtime_lock is being held for long periods on larger systems due
> > > to an extensive amount of time being spent in calc_load(),
> > > specifically here:
> > > do_timer->update_times->calc_load->count_active_tasks->nr_active()
> > >
> > > On a 64 cpu system I've seen this take approximately 55 usec.
> > > Presumably it would be worse on larger systems. This causes other
> > > cpus to be held off in places such as
> > > scheduler_tick->sched_clock_tick waiting for the xtime_lock to be
> > > released.
> >
> > I thought more about that. Why don't we move the calc_load() call into
> > the timer softirq context and avoid fiddling with all the call sites ?
> > Also moving calc_load out of the timer interrupt context reduces the
> > interrupts off section as well.
> >
> Sounds reasonable to me.
Ok. I looked once more and I wonder if it's possible to avoid the
whole for_each_online_cpu() business by moving the accounting into the
scheduler and be a bit more clever than just blindly running over all
cpus everytime.
/me goes back to stare a bit more at the avenrun stuff
Thanks,
tglx
next prev parent reply other threads:[~2009-04-11 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 17:34 Dimitri Sivanich
2009-04-11 9:51 ` Thomas Gleixner
2009-04-11 16:24 ` Dimitri Sivanich
2009-04-11 16:53 ` Thomas Gleixner [this message]
2009-04-11 17:15 ` Dimitri Sivanich
2009-04-11 18:57 ` Thomas Gleixner
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.LFD.2.00.0904111849450.21577@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sivanich@sgi.com \
/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®