From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934007AbcIVNXz (ORCPT ); Thu, 22 Sep 2016 09:23:55 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55108 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933098AbcIVNXw (ORCPT ); Thu, 22 Sep 2016 09:23:52 -0400 Date: Thu, 22 Sep 2016 15:23:47 +0200 From: Peter Zijlstra To: Waiman Long Cc: Thomas Gleixner , Ingo Molnar , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Davidlohr Bueso , Jason Low , Scott J Norton , Douglas Hatch Subject: Re: [RFC PATCH v2 3/5] futex: Throughput-optimized (TO) futexes Message-ID: <20160922132347.GX5012@twins.programming.kicks-ass.net> References: <1474378963-15496-1-git-send-email-Waiman.Long@hpe.com> <1474378963-15496-4-git-send-email-Waiman.Long@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474378963-15496-4-git-send-email-Waiman.Long@hpe.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 20, 2016 at 09:42:41AM -0400, Waiman Long wrote: > +/* > + * Spinning threshold before enabling lock handoff. > + * Each sleep will decrement the threshold by 1/32 of the start value. > + */ > +#define TO_SPIN_THRESHOLD (1 << 13) > +#define TO_SLEEP_DECREMENT (TO_SPIN_THRESHOLD/32) Argh, we should really get rid of those stupid numbers. Wasn't there a patch set working on implementing paravirt functions that would make all this fixable in a sane way?