Re: [PATCH RFC] pm_qos_requirement might sleep

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: John Kacur
Date: Thursday, August 28, 2008 - 11:31 pm

On Fri, Aug 29, 2008 at 2:32 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:

Hi Andrew

The purpose of the patch is to remove the spin_lock around the read in
the function pm_qos_requirement - since spinlocks can sleep in -rt and
this function is called from idle. I did propose a patch, that simply
removed the spinlock, since Peter Zilstra and others (yourself) point
out, the lock isn't needed to read a single word from memory. Although
the patch worked fine, Arjan objected to it, because it was not
symmetric. A reader of the code might wonder why it was locked in
other functions but not here. He suggested changing it to an atomic
type might be less confusing. The alternative which I like better
actually is to simply remove the lock in pm_qos_requirement and add a
comment for readers of the code.

John
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Mon Aug 4, 1:52 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, Peter Zijlstra, (Tue Aug 5, 12:25 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Tue Aug 5, 1:49 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, Peter Zijlstra, (Tue Aug 5, 2:09 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Tue Aug 5, 3:18 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Mon Aug 11, 6:25 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Tue Aug 12, 3:49 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Wed Aug 13, 1:24 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Thu Aug 14, 8:52 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, Peter Zijlstra, (Thu Aug 14, 10:48 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Thu Aug 14, 3:51 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Wed Aug 20, 12:14 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Mon Aug 25, 9:34 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, Peter Zijlstra, (Mon Aug 25, 9:35 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Tue Aug 26, 1:48 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Tue Aug 26, 9:18 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Tue Aug 26, 10:45 am)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Thu Aug 28, 12:38 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, mark gross, (Thu Aug 28, 12:44 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, Andrew Morton, (Thu Aug 28, 5:32 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, John Kacur, (Thu Aug 28, 11:31 pm)
Re: [PATCH RFC] pm_qos_requirement might sleep, Steven Rostedt, (Fri Aug 29, 7:29 am)