Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753630AbcLFTIn (ORCPT ); Tue, 6 Dec 2016 14:08:43 -0500 Received: from merlin.infradead.org ([205.233.59.134]:37388 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752355AbcLFTIl (ORCPT ); Tue, 6 Dec 2016 14:08:41 -0500 Date: Tue, 6 Dec 2016 19:29:35 +0100 From: Peter Zijlstra To: Waiman Long Cc: Nicolai =?iso-8859-1?Q?H=E4hnle?= , linux-kernel@vger.kernel.org, Nicolai =?iso-8859-1?Q?H=E4hnle?= , Ingo Molnar , Maarten Lankhorst , Daniel Vetter , Chris Wilson , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 02/11] locking/ww_mutex: Re-check ww->ctx in the inner optimistic spin loop Message-ID: <20161206182935.GD3107@twins.programming.kicks-ass.net> References: <1480601214-26583-1-git-send-email-nhaehnle@gmail.com> <1480601214-26583-3-git-send-email-nhaehnle@gmail.com> <20161206150620.GT3045@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 590 Lines: 15 On Tue, Dec 06, 2016 at 11:03:28AM -0500, Waiman Long wrote: > > The mutex_spin_on_owner() function was originally marked noinline > because it could be a major consumer of CPU cycles in a contended lock. > Having it shown separately in the perf output will help the users have a > better understanding of what is consuming all the CPU cycles. So I would > still like to keep it this way. ah!, I tried to dig through history but couldn't find a reason for it. > > If you have concern about additional latency for non-ww_mutex calls, one > alternative can be: That's pretty horrific :/