From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247AbcFIT5x (ORCPT ); Thu, 9 Jun 2016 15:57:53 -0400 Received: from www.linutronix.de ([62.245.132.108]:55651 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbcFIT5w (ORCPT ); Thu, 9 Jun 2016 15:57:52 -0400 Date: Thu, 9 Jun 2016 21:55:40 +0200 (CEST) From: Thomas Gleixner To: "Sell, Timothy C" cc: "corbet@lwn.net" , "mingo@redhat.com" , "hpa@zytor.com" , "gregkh@linuxfoundation.org" , "Arfvidson, Erik" , "hofrat@osadl.org" , "dzickus@redhat.com" , "jes.sorensen@redhat.com" , "Curtin, Alexander Paul" , "janani.rvchndrn@gmail.com" , "sudipm.mukherjee@gmail.com" , "prarit@redhat.com" , "Binder, David Anthony" , "nhorman@redhat.com" , "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , *S-Par-Maintainer , "Kershner, David A" Subject: RE: [PATCH v4 09/29] staging: unisys: visorinput: remove unnecessary locking In-Reply-To: Message-ID: References: <1465420463-24982-1-git-send-email-david.kershner@unisys.com> <1465420463-24982-10-git-send-email-david.kershner@unisys.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Jun 2016, Sell, Timothy C wrote: > > From: Thomas Gleixner [mailto:tglx@linutronix.de] > > > > I think I asked this before, but I might have missed the answer. > > > > Why is this a rw_sempahore? It's never taken with down_read and looking > > at the usage sites it's simply a mutex, right? > > If the semaphore --> mutex change would have been as simple as it sounds, > we would have had NO problem including it with the next version (v3) of this > patchset. But unfortunately, this change uncovered a latent defect, which > necessitated yet another patch. (I know... hard to believe that something > this simple would do that, but it did.) Rather than further complicating this > patchset, we thought it would be better to address the visorinput issues via a > separate follow-on patchset. That makes me curious. What's the issue? Functional is the mutex the same thing as the r/w semaphore when the latter is only taken down_write and locked and released by the same thread, which is the case as far as I can tell. > Is that acceptable for you? Please fix it before moving the drivers out of staging. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 9 Jun 2016 21:55:40 +0200 (CEST) From: Thomas Gleixner Subject: RE: [PATCH v4 09/29] staging: unisys: visorinput: remove unnecessary locking In-Reply-To: Message-ID: References: <1465420463-24982-1-git-send-email-david.kershner@unisys.com> <1465420463-24982-10-git-send-email-david.kershner@unisys.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-ID: To: "Sell, Timothy C" Cc: "corbet@lwn.net" , "mingo@redhat.com" , "hpa@zytor.com" , "gregkh@linuxfoundation.org" , "Arfvidson, Erik" , "hofrat@osadl.org" , "dzickus@redhat.com" , "jes.sorensen@redhat.com" , "Curtin, Alexander Paul" , "janani.rvchndrn@gmail.com" , "sudipm.mukherjee@gmail.com" , "prarit@redhat.com" , "Binder, David Anthony" , "nhorman@redhat.com" , "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , *S-Par-Maintainer , "Kershner, David A" On Thu, 9 Jun 2016, Sell, Timothy C wrote: > > From: Thomas Gleixner [mailto:tglx@linutronix.de] > > > > I think I asked this before, but I might have missed the answer. > > > > Why is this a rw_sempahore? It's never taken with down_read and looking > > at the usage sites it's simply a mutex, right? > > If the semaphore --> mutex change would have been as simple as it sounds, > we would have had NO problem including it with the next version (v3) of this > patchset. But unfortunately, this change uncovered a latent defect, which > necessitated yet another patch. (I know... hard to believe that something > this simple would do that, but it did.) Rather than further complicating this > patchset, we thought it would be better to address the visorinput issues via a > separate follow-on patchset. That makes me curious. What's the issue? Functional is the mutex the same thing as the r/w semaphore when the latter is only taken down_write and locked and released by the same thread, which is the case as far as I can tell. > Is that acceptable for you? Please fix it before moving the drivers out of staging. Thanks, tglx