Re: [PATCH RFC] pm_qos_requirement might sleep

Steven Rostedt
2008-08-29T14:29:53Z

On Fri, 29 Aug 2008, John Kacur 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.

This is a much better changelog, and is what should have been written in
the first place ;-)

-- Steve