lkml.org 
[lkml]   [2011]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86, efi: Don't recursively acquire rtc_lock
From
Date
On Thu, 2011-08-04 at 03:53 +0100, Jan Beulich wrote:
>
> Seems the wrong approach to me: The call happening with the lock held
> is the wrong part imo, and hence the fix ought to be to drop the lock
> there.

But what about other platforms that provide a get_wallclock()
implementation such as the kvm or xen code? If we called get_wallclock()
without rtc_lock held we'd be requiring everyone to lock it in their
clock code, which is unnecessary work and increases the amount of code
that touches rtc_lock (not to mention spreading it across several
files).

I think it's much better to do the locking as high up the callstack as
possible and preferably in as few places as possible.

--
Matt Fleming, Intel Open Source Technology Center



\
 
 \ /
  Last update: 2011-08-04 11:37    [W:0.032 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site