From: Michael Bohan <mbohan@codeaurora.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-arm-msm@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/2] hrtimer: Consider preemption when migrating hrtimer cpu_bases
Date: Thu, 18 Apr 2013 18:37:37 -0700 [thread overview]
Message-ID: <51709FE1.20807@codeaurora.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1304181138290.21884@ionos>
On 4/18/2013 2:40 AM, Thomas Gleixner wrote:
> On Wed, 10 Apr 2013, Michael Bohan wrote:
>
>> When switching to a new cpu_base in switch_hrtimer_base(), we
>> briefly enable preemption by unlocking the cpu_base lock in two
>> places. During this interval it's possible for the running thread
>> to be swapped to a different CPU.
>>
>> Consider the following example:
>>
>> CPU #0 CPU #1
>> ---- ----
>> hrtimer_start() ...
>> lock_hrtimer_base()
>> switch_hrtimer_base()
>> this_cpu = 0;
>> target_cpu_base = 0;
>> raw_spin_unlock(&cpu_base->lock)
>> <migrate to CPU 1>
>
> Errm. switch_hrtimer_base() is called with interrupts disabled and
> they stay disabled, so how exactly is the task going to be migrated?
My mistake - I missed that important fact. Please disregard this.
Thanks,
Mike
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-04-19 1:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 21:07 [PATCH 0/2] hrtimer preemption bug fixes Michael Bohan
2013-04-10 21:07 ` [PATCH 1/2] hrtimer: Consider preemption when migrating hrtimer cpu_bases Michael Bohan
2013-04-18 9:40 ` Thomas Gleixner
2013-04-19 1:37 ` Michael Bohan [this message]
2013-04-10 21:07 ` [PATCH 2/2] hrtimer: Prevent enqueue of hrtimer on dead CPU Michael Bohan
2013-04-18 9:44 ` 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=51709FE1.20807@codeaurora.org \
--to=mbohan@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).