From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Bohan Subject: Re: [PATCH 1/2] hrtimer: Consider preemption when migrating hrtimer cpu_bases Date: Thu, 18 Apr 2013 18:37:37 -0700 Message-ID: <51709FE1.20807@codeaurora.org> References: <1365628068-32738-1-git-send-email-mbohan@codeaurora.org> <1365628068-32738-2-git-send-email-mbohan@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:20977 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967641Ab3DSBhv (ORCPT ); Thu, 18 Apr 2013 21:37:51 -0400 In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Thomas Gleixner Cc: LKML , linux-arm-msm@vger.kernel.org, Peter Zijlstra 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) >> > > 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