mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: Michael Cree <mcree@orcon.net.nz>
Cc: linux-kernel@vger.kernel.org, Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	mingo@redhat.com, a.p.zijlstra@chello.nl,
	linux-alpha@vger.kernel.org
Subject: Re: [PATCH] alpha: Shift perf event pending work earlier in timer interrupt
Date: Sun, 19 Sep 2010 00:51:18 -0400	[thread overview]
Message-ID: <AANLkTimoyT7KLtrNL3Wkvcxg1Da6-EdHP5MaKBbh0B1e@mail.gmail.com> (raw)
In-Reply-To: <1284861940-6571-1-git-send-email-mcree@orcon.net.nz>

On Sat, Sep 18, 2010 at 10:05 PM, Michael Cree <mcree@orcon.net.nz> wrote:
> Pending work from the performance event subsystem is executed in
> the timer interrupt.  This patch shifts the call to
> perf_event_do_pending() before the call to update_process_times()
> as the latter may call back into the perf event subsystem and it
> is prudent to have the pending work executed first.
>
> Signed-off-by: Michael Cree <mcree@orcon.net.nz>
> ---
>  arch/alpha/kernel/time.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
> index eacceb2..396af17 100644
> --- a/arch/alpha/kernel/time.c
> +++ b/arch/alpha/kernel/time.c
> @@ -191,16 +191,16 @@ irqreturn_t timer_interrupt(int irq, void *dev)
>
>        write_sequnlock(&xtime_lock);
>
> -#ifndef CONFIG_SMP
> -       while (nticks--)
> -               update_process_times(user_mode(get_irq_regs()));
> -#endif
> -
>        if (test_perf_event_pending()) {
>                clear_perf_event_pending();
>                perf_event_do_pending();
>        }
>
> +#ifndef CONFIG_SMP
> +       while (nticks--)
> +               update_process_times(user_mode(get_irq_regs()));
> +#endif
> +
>        return IRQ_HANDLED;
>  }
>
> --
> 1.7.1

Thanks! Added to my tree and sent to Linus.

      reply	other threads:[~2010-09-19  4:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-19  2:05 Michael Cree
2010-09-19  4:51 ` Matt Turner [this message]

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=AANLkTimoyT7KLtrNL3Wkvcxg1Da6-EdHP5MaKBbh0B1e@mail.gmail.com \
    --to=mattst88@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcree@orcon.net.nz \
    --cc=mingo@redhat.com \
    --cc=rth@twiddle.net \
    /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®