[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131210162411.GM12849@twins.programming.kicks-ass.net>
Date: Tue, 10 Dec 2013 17:24:11 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Davidlohr Bueso <davidlohr@...com>
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org,
dvhart@...ux.intel.com, tglx@...utronix.de,
paulmck@...ux.vnet.ibm.com, efault@....de, jeffm@...e.com,
torvalds@...ux-foundation.org, scott.norton@...com,
tom.vaden@...com, aswin@...com, Waiman.Long@...com,
jason.low2@...com
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists