Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbdIFJGn (ORCPT ); Wed, 6 Sep 2017 05:06:43 -0400 Received: from merlin.infradead.org ([205.233.59.134]:32896 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752021AbdIFJGl (ORCPT ); Wed, 6 Sep 2017 05:06:41 -0400 Date: Wed, 6 Sep 2017 11:06:31 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: "chengjian (D)" , huawei.libin@huawei.com, mingo@redhat.com, dvhart@infradead.org, linux-kernel@vger.kernel.org Subject: Re: a competition when some threads acquire futex Message-ID: <20170906090631.tcer7olhogwxfrlh@hirez.programming.kicks-ass.net> References: <3e497508-876f-6474-3f3d-acab06a63b55@huawei.com> <555186f2-8240-f7d0-e1b0-9ad1a67ff34c@huawei.com> <20170906085608.ogz4jhv2pieybzob@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170906085608.ogz4jhv2pieybzob@hirez.programming.kicks-ass.net> 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: 552 Lines: 16 On Wed, Sep 06, 2017 at 10:56:08AM +0200, Peter Zijlstra wrote: > Right, but even if it was a coherent patch, I'm not sure it makes sense. > > futex_wait() / futex_wake() don't make ordering guarantees and in > general you don't get to have wakeup preemption if you don't run a > PREEMPT kernel. > > So what makes this wakeup so special? Any changelog would need to have a > convincing argument. Also, even on !PREEMPT, if that wakeup sets NEED_RESCHED, the return to userspace after futex_wake() should reschedule. So I'm really not getting it.