linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clocksource: em_sti: Adjust clock event rating to fix SMP broadcast
Date: Thu, 29 Aug 2013 09:52:18 -0700	[thread overview]
Message-ID: <521F7C42.7060108@codeaurora.org> (raw)
In-Reply-To: <CANqRtoT=gMKBHG8qJWc7FjcYFaaf5hBzzv8=AOLneoveasmKoA@mail.gmail.com>

On 08/29/13 01:41, Magnus Damm wrote:
> Thanks for your suggestion. Yes, there was indeed some confusion. Now
> after diving into the code a bit deeper I can finally understand what
> you mean.
>
> Instead of adjusting the rating I've changed the cpumask member like this:
>
> --- 0001/drivers/clocksource/em_sti.c
> +++ work/drivers/clocksource/em_sti.c    2013-08-29 17:33:16.000000000 +0900
> @@ -301,7 +301,7 @@ static void em_sti_register_clockevent(s
>      ced->name = dev_name(&p->pdev->dev);
>      ced->features = CLOCK_EVT_FEAT_ONESHOT;
>      ced->rating = 200;
> -    ced->cpumask = cpumask_of(0);
> +    ced->cpumask = cpu_all_mask;

It would be better to use cpu_possible_mask.

>      ced->set_next_event = em_sti_clock_event_next;
>      ced->set_mode = em_sti_clock_event_mode;
>
> Without the cpumask fix or without the earlier rating fix the
> following interrupt count can be seen in /proc/interrupts on KZM9D:
>
> 157:        140          0       GIC 157  e0180000.sti
> 160:          0          0  e0050000.gpio   1  eth0
> IPI0:          0          0  CPU wakeup interrupts
> IPI1:          0          0  Timer broadcast interrupts
>
> Above, notice how no IPI1 interrupts seem to be arriving.
>
> With the cpumask fix above the interrupt count becomes like this:
>
>  157:        559          0       GIC 157  e0180000.sti
> 160:          0          0  e0050000.gpio   1  eth0
> IPI0:          0          0  CPU wakeup interrupts
> IPI1:          0        601  Timer broadcast interrupts
>
> Would this be in line with your expectation?

Yes that is what I'm saying. What is the output of cat /proc/timer_list?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2013-08-29 16:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31  6:25 [PATCH] clocksource: em_sti: Adjust clock event rating to fix SMP broadcast Simon Horman
2013-07-31 17:32 ` Stephen Boyd
2013-07-31 19:17   ` Magnus Damm
2013-07-31 20:45     ` Stephen Boyd
2013-08-05  1:45       ` Simon Horman
2013-08-29  1:53         ` Simon Horman
2013-08-29  8:41       ` Magnus Damm
2013-08-29 16:52         ` Stephen Boyd [this message]
2013-08-30  7:02           ` Magnus Damm

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=521F7C42.7060108@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).