Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: "Kohli, Gaurav" <gkohli@codeaurora.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: john.stultz@linaro.org, sboyd@kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2] timers: Clear must_forward_clk inside base lock
Date: Thu, 2 Aug 2018 12:34:21 +0530	[thread overview]
Message-ID: <fce3d68c-341d-e720-773f-0867e7770c27@codeaurora.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1808020826580.1835@nanos.tec.linutronix.de>



On 8/2/2018 12:04 PM, Thomas Gleixner wrote:
> On Thu, 2 Aug 2018, Gaurav Kohli wrote:
>> Timer wheel base->must_forward_clock is indicating that
>> the base clock might be stale due to a long idle sleep.
>> The forwarding of base clock takes place in softirq of timer
> 
> of the base clock takes place in the timer softirq ...
> 
>> or when a timer is enqueued to base which is idle. While migrate
> 
> to a base ..
> 
>> timer from remote CPU to the new base which is idle, then
> 
> See below.
> 
>> following race can happen:
>>
>>    CPU0                                  CPU1
>>    run_timer_softirq                     timers_dead_cpu
>>
>> 					base = lock_timer_base(timer);
>>    base->must_forward_clk = false
>> 					if (base->must_forward_clk)
>> 				         forward(base); >>skip
>>
>> 					migrate_timer_list
> 
> I don't know why you insist on migrate_timer_list() being part of the
> picture here.

Hi Thomas,

Thanks for comment.
I agree this can come with normal enqueue of timer as well, will make it 
more generic to avoid confuzion and upload new patch for same.

Regards
Gaurav


> 
> It's only _ONE_ particular way to observe that issue. But it's not the only
> way. ANY remote enqueue which hits the situation on the other CPU (CPU0 in
> the example) has this problem. Tying it to migrate_timer_list() just
> because you observed it that way is actively misleading. Surely you can add
> a sentence that you observed it in that case, but that's supplemental
> information.
> 
> Thanks,
> 
> 	tglx
> 

-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, 
Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

      reply	other threads:[~2018-08-02  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  5:15 [PATCH v2] timers: Clear must_forward_clk inside base lock Gaurav Kohli
2018-08-02  6:34 ` Thomas Gleixner
2018-08-02  7:04   ` Kohli, Gaurav [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=fce3d68c-341d-e720-773f-0867e7770c27@codeaurora.org \
    --to=gkohli@codeaurora.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --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