Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759568AbcLAOm6 (ORCPT ); Thu, 1 Dec 2016 09:42:58 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:49576 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756538AbcLAOm4 (ORCPT ); Thu, 1 Dec 2016 09:42:56 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Thu, 1 Dec 2016 14:42:10 +0000 From: Chris Wilson To: Nicolai =?iso-8859-1?Q?H=E4hnle?= Cc: linux-kernel@vger.kernel.org, Nicolai =?iso-8859-1?Q?H=E4hnle?= , Peter Zijlstra , Ingo Molnar , Maarten Lankhorst , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 03/11] locking/ww_mutex: Extract stamp comparison to __ww_mutex_stamp_after Message-ID: <20161201144210.GG29430@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Nicolai =?iso-8859-1?Q?H=E4hnle?= , linux-kernel@vger.kernel.org, Nicolai =?iso-8859-1?Q?H=E4hnle?= , Peter Zijlstra , Ingo Molnar , Maarten Lankhorst , Daniel Vetter , dri-devel@lists.freedesktop.org References: <1480601214-26583-1-git-send-email-nhaehnle@gmail.com> <1480601214-26583-4-git-send-email-nhaehnle@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1480601214-26583-4-git-send-email-nhaehnle@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 38 On Thu, Dec 01, 2016 at 03:06:46PM +0100, Nicolai H?hnle wrote: > From: Nicolai H?hnle > > The function will be re-used in subsequent patches. > > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Maarten Lankhorst > Cc: Daniel Vetter > Cc: Chris Wilson > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Nicolai H?hnle > --- > kernel/locking/mutex.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c > index 0afa998..200629a 100644 > --- a/kernel/locking/mutex.c > +++ b/kernel/locking/mutex.c > @@ -277,6 +277,13 @@ static __always_inline void ww_mutex_lock_acquired(struct ww_mutex *ww, > ww_ctx->acquired++; > } > > +static inline bool __sched > +__ww_mutex_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b) Should it be ww_mutex_stamp or ww_acquire_stamp / ww_ctx_stamp? Nothing else operates on the ww_acquire_ctx without a ww_mutex so it might look a bit odd if it didn't use ww_mutex. Patch only does what it says on tin, so Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre