On Thu, Jan 2, 2014 at 2:31 AM, Suresh Thiagarajan
wrote:
>
>
> On Fri, Dec 27, 2013 at 9:48 PM, Oleg Nesterov wrote:
>> On 12/24, Suresh Thiagarajan wrote:
>>>
>>> Below is a small pseudo code on protecting/serializing the flag for global
>>> access.
>>> struct temp
>>> {
>>> ...
>>>
On Fri, Dec 27, 2013 at 9:48 PM, Oleg Nesterov wrote:
> On 12/24, Suresh Thiagarajan wrote:
>>
>> Below is a small pseudo code on protecting/serializing the flag for global
>> access.
>> struct temp
>> {
>> ...
>> spinlock_t lock;
>> unsigned long lock_flags;
>> };
>> void my_
On 12/24, Suresh Thiagarajan wrote:
>
> Below is a small pseudo code on protecting/serializing the flag for global
> access.
> struct temp
> {
> ...
> spinlock_t lock;
> unsigned long lock_flags;
> };
> void my_lock(struct temp *t)
> {
>unsigned long flag; // thre
On Tue, 2013-12-24 at 09:13 +, Suresh Thiagarajan wrote:
>
> On Tue, Dec 24, 2013 at 1:59 PM, Ingo Molnar wrote:
> >
> > * Oleg Nesterov wrote:
> >
> >> On 12/23, Ingo Molnar wrote:
> >> >
> >> > * Oleg Nesterov wrote:
> >> >
> >> > > Initially I thought that this is obviously wrong, irqsav
On Tue, Dec 24, 2013 at 1:59 PM, Ingo Molnar wrote:
>
> * Oleg Nesterov wrote:
>
>> On 12/23, Ingo Molnar wrote:
>> >
>> > * Oleg Nesterov wrote:
>> >
>> > > Initially I thought that this is obviously wrong, irqsave/irqrestore
>> > > assume that "flags" is owned by the caller, not by the lock.
* Oleg Nesterov wrote:
> On 12/23, Ingo Molnar wrote:
> >
> > * Oleg Nesterov wrote:
> >
> > > Initially I thought that this is obviously wrong, irqsave/irqrestore
> > > assume that "flags" is owned by the caller, not by the lock. And
> > > iirc this was certainly wrong in the past.
> > >
> > >
On Mon, Dec 23, 2013 at 10:24 AM, Oleg Nesterov wrote:
>
> However, the code above already has the users. Do you think it makes
> sense to add something like
No. I think it makes sense to put a big warning on any users you find,
and fart in the general direction of any developer who did that brok
On 12/23, Ingo Molnar wrote:
>
> * Oleg Nesterov wrote:
>
> > Initially I thought that this is obviously wrong, irqsave/irqrestore
> > assume that "flags" is owned by the caller, not by the lock. And
> > iirc this was certainly wrong in the past.
> >
> > But when I look at spinlock.c it seems that
* Oleg Nesterov wrote:
> On 12/23, Oleg Nesterov wrote:
> >
> > Perhaps we should ask the maintainers upstream? Even if this works, I am
> > not sure this is _supposed_ to work. I mean, in theory spin_lock_irqave()
> > can be changed as, say
> >
> > #define spin_lock_irqsave(lock, flags)
On 12/23, Linus Torvalds wrote:
>
> On Mon, Dec 23, 2013 at 9:27 AM, Oleg Nesterov wrote:
> >
> > In short, is this code
> >
> > spinlock_t LOCK;
> > unsigned long FLAGS;
> >
> > void my_lock(void)
> > {
> > spin_lock_irqsave(&LOCK, FLAGS);
> >
On Mon, Dec 23, 2013 at 9:27 AM, Oleg Nesterov wrote:
>
> In short, is this code
>
> spinlock_t LOCK;
> unsigned long FLAGS;
>
> void my_lock(void)
> {
> spin_lock_irqsave(&LOCK, FLAGS);
> }
>
> void my_unlock(void)
> {
>
11 matches
Mail list logo