lkml.org 
[lkml]   [2013]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v4 5/5] x86,smp: limit spinlock delay on virtual machines
On Sat, Jan 26, 2013 at 01:00:43PM +0100, Ingo Molnar wrote:
> > +void __init init_spinlock_delay(void)
> > +{
> > + if (x86_hyper)
> > + max_spinlock_delay = MAX_SPINLOCK_DELAY_GUEST;
>
> I realize that you took existing code and extended it, but that
> chunk of code looks pretty disgusting visually now - at minimum
> it should be vertically aligned as most other kernel code does.
>
> The comment should also tell that the unit of these values is
> 'spinlock-op loops' or so.

Also, with currently making PARAVIRT_GUEST optional, x86_hyper is maybe
a bad choice of a variable to test.

Maybe instead to this:

if (IS_ENABLED(CONFIG_PARAVIRT_GUEST))
...

Btw, this CONFIG_PARAVIRT_GUEST will change into
CONFIG_HYPERVISOR_GUEST.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-01-26 14:21    [W:0.086 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site