lkml.org 
[lkml]   [2013]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] futex: Avoid taking hb lock if nothing to wakeup
On Tue, Dec 03, 2013 at 01:45:27AM -0800, Davidlohr Bueso wrote:
> @@ -203,6 +221,9 @@ static const struct futex_q futex_q_init = {
> * waiting on a futex.
> */
> struct futex_hash_bucket {
> +#ifdef CONFIG_SMP
> + atomic_t waiters;
> +#endif
> spinlock_t lock;
> struct plist_head chain;
> } ____cacheline_aligned_in_smp;

> @@ -2805,6 +2906,9 @@ static int __init futex_init(void)
> for (i = 0; i < futex_hashsize; i++) {
> plist_head_init(&futex_queues[i].chain);
> spin_lock_init(&futex_queues[i].lock);
> +#ifdef CONFIG_SMP
> + atomic_set(&futex_queues[i].waiters, 0);
> +#endif
> }
>
> return 0;

Just remove those two #ifdefs, its not like the data structure size
matters at this point.


\
 
 \ /
  Last update: 2013-12-10 17:41    [W:0.108 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site