From: Peter Zijlstra Subject: Re: [PATCH v10 12/19] unfair qspinlock: Variable frequency lock stealing mechanism Date: Thu, 8 May 2014 21:19:44 +0200 Message-ID: <20140508191944.GT2844@laptop.programming.kicks-ass.net> References: <1399474907-22206-1-git-send-email-Waiman.Long@hp.com> <1399474907-22206-13-git-send-email-Waiman.Long@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-arch@vger.kernel.org, Rik van Riel , Raghavendra K T , Oleg Nesterov , Gleb Natapov , kvm@vger.kernel.org, Konrad Rzeszutek Wilk , Scott J Norton , x86@kernel.org, Paolo Bonzini , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Ingo Molnar , Chegu Vinod , David Vrabel , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Thomas Gleixner , "Paul E. McKenney" , Linus Torvalds , Boris Ostrovsky To: Waiman Long Return-path: Content-Disposition: inline In-Reply-To: <1399474907-22206-13-git-send-email-Waiman.Long@hp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: kvm.vger.kernel.org On Wed, May 07, 2014 at 11:01:40AM -0400, Waiman Long wrote: > +#define DEF_LOOP_CNT(c) int c = 0 > +#define INC_LOOP_CNT(c) (c)++ > +#define LOOP_CNT(c) c > +#define LSTEAL_MIN (1 << 3) > +#define LSTEAL_MAX (1 << 10) > +#define LSTEAL_MIN_MASK (LSTEAL_MIN - 1) > +#define LSTEAL_MAX_MASK (LSTEAL_MAX - 1) *groan*.. why do you have to write the most obfuscated code ever? We're not ioccc.org.