[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [ANNOUNCE] mdb-2.6.27-rc2-ia32-08-07-08.patch
> wrote:
>>> wrote:
>>>> rspin locks are for these types of cases -- so if I fault on the same
>>>> processor I took the lock on it just bumps a counter -- yes, it is
>>>> atomic
>>>> and SMP safe to do it this way.
>>> Only if all contexts which take rlocks are not preemptible.
> [...]
>> check mdb-main.c -- I disable preemption before rspin_lock is attempted.
>> Since the only processor which sets the proc number does do inside the
>> spin lock, and the other processors only read it, unless memory is
>> corrupted or the machine is severely broken, its SMP safe to this.
> Then it is recommendable that you document the call context requirements
> at the functions. And you can and IMO should drop the _irq_save and
> _irq_restore from the spinlock accessors in the rlock accessors. And
> drop the volatile qualifier of the rlock accessor argument while you are
> at it.
> I see that you are calling save_flags/ restore_flags in
> mdb-main.c::mdb(). These are marked as deprecated. Would
> local_irq_save/ local_irq_restore be correct at these places?

You have sharp eyes. Yes, you are correct. added to the list of


> --
> Stefan Richter
> -=====-==--- =--- --===

 \ /
  Last update: 2008-08-07 20:17    [W:0.054 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site