Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbdGFHmm (ORCPT ); Thu, 6 Jul 2017 03:42:42 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:44497 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbdGFHml (ORCPT ); Thu, 6 Jul 2017 03:42:41 -0400 Date: Thu, 6 Jul 2017 09:42:34 +0200 From: Peter Zijlstra To: Ingo Molnar Cc: Niklas Cassel , stable@vger.kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, ktkhai@virtuozzo.com, hpa@zytor.com, linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org Subject: Re: [tip:locking/urgent] locking/rwsem-spinlock: Fix EINTR branch in __down_write_common() Message-ID: <20170706074234.ulpvtse7s2qtdwgx@hirez.programming.kicks-ass.net> References: <149762063282.19811.9129615532201147826.stgit@localhost.localdomain> <8a41493e-8752-dd11-0c00-f441b0ac27c6@axis.com> <20170706072858.yo45chbf6fnccmgw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170706072858.yo45chbf6fnccmgw@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 340 Lines: 8 On Thu, Jul 06, 2017 at 09:28:58AM +0200, Ingo Molnar wrote: > It's more straightforward to just do the canonical sem->count >= 0 test that we do > elsewhere in the rwsem-spinlock code. > > PeterZ, what's your preference? Leave it as is.. it doesn't matter (the 0 case shouldn't happen) and as you say >= 0 is what most other code does.