lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] RFC: abstract access to xtime_lock into a set of inline functions
From
On Thu, Jan 20, 2011 at 9:30 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Thu, Jan 20, 2011 at 06:14:08PM +0100, Torben Hohn wrote:
>> the -rt patches change the xtime_lock to a raw_seqlock_t
>> so a pretty huge portion of the patch deals with changing
>> the locking functions.
>>
>> this commit uses inline functions, to hide the type
>> of the lock.
>
> That's not how kernel code usually works.

Yea, I'm not a fan of this patch either.


>> -     write_seqlock(&xtime_lock);
>> +     xtime_write_seqlock();
>>       do_timer(1);
>> -     write_sequnlock(&xtime_lock);
>> +     xtime_write_sequnlock();
>
> However there's a pretty clear pattern of taking xtime_lock, calling
> do_timer and then releasing.  A useful thing you could do is to rename
> do_timer to do_timer_locked and make do_timer take and release
> xtime_lock in one place.

Seems like a reasonable suggestion. I suspect there's still quite a
bit of stuff done under the same lock right around do_timer on a
number of arches, but having a locked call would cut down on how
widely xtime is used.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-01-20 20:39    [W:0.058 / U:0.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site