From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752065AbdI0VUW (ORCPT ); Wed, 27 Sep 2017 17:20:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:37681 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751801AbdI0VUV (ORCPT ); Wed, 27 Sep 2017 17:20:21 -0400 Date: Wed, 27 Sep 2017 14:20:12 -0700 From: Davidlohr Bueso To: Andrea Parri Cc: Prateek Sood , mingo@kernel.org, longman@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, sramana@codeaurora.org Subject: Re: [PATCH] rwsem: fix missed wakeup due to reordering of load Message-ID: <20170927212012.GA26599@linux-80c1.suse> References: <1504794658-15397-1-git-send-email-prsood@codeaurora.org> <20170920145254.GA3406@linux-80c1.suse> <20170920211727.GA26082@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170920211727.GA26082@andrea> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Sep 2017, Andrea Parri wrote: >> Instead, how about just removing the release from atomic_long_sub_return_release() >> such that the osq load is not hoisted over the atomic compound (along with Peter's >> comment): > >This solution will actually enforce a stronger (full) ordering w.r.t. the >solution described by Prateek and Peter. Also, it will "trade" two lwsync >for two sync (powerpc), one dmb.ld for one dmb (arm64). > >What are the reasons you would prefer this? It was mainly to maintain consistency about dealing with sem->count, but sure I won't argue with the above.