From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Rob van der Heij <rvdheij@gmail.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Ingo Molnar <mingo@elte.hu>, john stultz <johnstul@us.ibm.com>
Subject: Re: [patch 1/2] idle profile hits with NOHZ
Date: Fri, 29 May 2009 14:56:14 +0200 [thread overview]
Message-ID: <20090529145614.77694e20@skybase> (raw)
In-Reply-To: <alpine.LFD.2.00.0905282204130.3397@localhost.localdomain>
On Thu, 28 May 2009 22:19:44 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:
> On Thu, 28 May 2009, Martin Schwidefsky wrote:
> > --- quilt-2.6.orig/kernel/time/tick-sched.c
> > +++ quilt-2.6/kernel/time/tick-sched.c
> > @@ -166,6 +166,7 @@ static void tick_nohz_stop_idle(int cpu)
> > ts->idle_lastupdate = now;
> > ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta);
> > ts->idle_active = 0;
> > + ts->idle_pc = profile_pc(get_irq_regs());
>
> Hmm, tick_nohz_stop_idle() is called from
> tick_nohz_restart_sched_tick() as well in the context of the idle
> task.
>
> I think there is no guarantee that get_irq_regs() will return
> anything useful in thread context.
>
> So get_irq_regs() might return a NULL pointer which will explode
> some of the profile_pc() implementations. If not it can still feed
> total nonsense to the profile_hits() call.
Drat, but if it is called from idle we should be able to just skip the
assignment to ts->idle_pc, no? Then a simple in_interrupt() test is
missing.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2009-05-29 12:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 15:04 [patch 0/2] NOHZ vs. profile/oprofile Martin Schwidefsky
2009-05-28 15:04 ` [patch 1/2] idle profile hits with NOHZ Martin Schwidefsky
2009-05-28 20:19 ` Thomas Gleixner
2009-05-29 12:56 ` Martin Schwidefsky [this message]
2009-05-29 13:15 ` Thomas Gleixner
2009-05-28 15:04 ` [patch 2/2] keep on ticking if oprofile is active Martin Schwidefsky
2009-05-28 20:29 ` Thomas Gleixner
2009-05-29 12:57 ` Martin Schwidefsky
2009-05-29 13:14 ` Thomas Gleixner
2009-06-01 8:09 ` Andi Kleen
2009-06-01 10:22 ` Martin Schwidefsky
-- strict thread matches above, loose matches on Subject: below --
2009-06-03 15:22 [patch 0/2] NOHZ vs. profile/oprofile v2 Martin Schwidefsky
2009-06-03 15:22 ` [patch 1/2] idle profile hits with NOHZ Martin Schwidefsky
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=20090529145614.77694e20@skybase \
--to=schwidefsky@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rvdheij@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.