lkml.org 
[lkml]   [2012]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 3/3 -v2] x86,smp: auto tune spinlock backoff delay factor
From
Date
On Wed, 2012-12-26 at 11:10 -0800, Eric Dumazet wrote:

> +#define DELAY_HASH_SHIFT 4
> +DEFINE_PER_CPU(int [1 << DELAY_HASH_SHIFT], spinlock_delay) = {
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> + MIN_SPINLOCK_DELAY, MIN_SPINLOCK_DELAY,
> +};

This can use the following initialize by the way :

DEFINE_PER_CPU(int [1 << DELAY_HASH_SHIFT], spinlock_delay) = {
[0 ... (1 << DELAY_HASH_SHIFT) - 1] = MIN_SPINLOCK_DELAY,
};





\
 
 \ /
  Last update: 2012-12-26 20:41    [W:0.110 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site