From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbcGMSh4 (ORCPT ); Wed, 13 Jul 2016 14:37:56 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36495 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223AbcGMShr (ORCPT ); Wed, 13 Jul 2016 14:37:47 -0400 Subject: Re: [PATCH 2/2] ipc/sem.c: Remove duplicated memory barriers. To: Davidlohr Bueso , Michael Ellerman References: <1468386412-3608-1-git-send-email-manfred@colorfullife.com> <1468386412-3608-2-git-send-email-manfred@colorfullife.com> <1468386412-3608-3-git-send-email-manfred@colorfullife.com> <20160713161615.GA2271@linux-80c1.suse> Cc: "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , LKML , Thomas Gleixner , Ingo Molnar , 1vier1@web.de, felixh@informatik.uni-bremen.de From: Manfred Spraul Message-ID: Date: Wed, 13 Jul 2016 20:37:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160713161615.GA2271@linux-80c1.suse> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Davidlohr, On 07/13/2016 06:16 PM, Davidlohr Bueso wrote: > Manfred, shouldn't this patch be part of patch 1 (as you add the > unnecessary barriers there? Iow, can we have a single patch for all this? > Two reasons: - patch 1 is safe for backporting, patch 2 not. - patch 1 is safe on all architectures, for patch 2 I would like to get some review feedback. e.g. I just found/read 51d7d5205d33 ("powerpc: Add smp_mb() to arch_spin_is_locked()"): For powerpc, a smp_mb() was added into spin_is_locked(), more or less for ipc/sem.c. Patch 1 replaces the spin_is_locked() with smp_load_acquire(). Isn't that the proof that smp_mb() is required? -- Manfred