[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871v8k7cd6.fsf@deeprootsystems.com>
Date: Thu, 23 Sep 2010 07:39:33 -0700
From: Kevin Hilman <khilman@...prootsystems.com>
To: Nishanth Menon <nm@...com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
lkml <linux-kernel@...r.kernel.org>,
linux-pm <linux-pm@...ts.linux-foundation.org>,
l-o <linux-omap@...r.kernel.org>,
l-a <linux-arm-kernel@...ts.infradead.org>,
linux-doc <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v3] power: introduce library for device-specific OPPs
Nishanth Menon <nm@...com> writes:
> Rafael J. Wysocki had written, on 09/22/2010 07:03 PM, the following:
>> [Trimming the CC list slightly.]
> [...]
>
>> ...
>>
>> First, thanks for addressing the previous comments, things look much better
>> now. In particular the documentation has been improved a lot in my view.
> Thanks for the excellent reviews :)
>
> [...]
>
>>> +
>>> +WARNING on OPP List Modification Vs Query operations:
>>> +----------------------------------------------------
>>> +The OPP layer's query functions are expected to be used in multiple contexts
>>> +(including calls from interrupt locked context) based on SoC framework
>>> +implementation. Only OPP modification functions are guaranteed exclusivity by
>>> +the OPP library. Exclusivity between query functions and modification functions
>>> +should be handled by the users such as the SoC framework appropriately; else,
>>> +there is a risk for the query functions to retrieve stale data.
>>
>> Well, this sounds like a good use case for RCU.
> Kevin did point out rwlock but am I confusing with
> http://lwn.net/Articles/364583/
> If I get the message right, rwlock is more or less on it's way out?
RCU is different from the reader-writer locks that are on their way out.
Let's think about RCU a little more and see if it might be worth using.
As these APIs are infrequencly accessed, I'm thinking a single spinlock
to protect the whole list from concurrent access/modification is
sufficient.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists