Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbcDCNS6 (ORCPT ); Sun, 3 Apr 2016 09:18:58 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:34527 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271AbcDCNS4 (ORCPT ); Sun, 3 Apr 2016 09:18:56 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160402095108.894519835@linutronix.de> <20160402110035.753145539@linutronix.de> <57000D4B.5000406@kernel.org> From: Andy Lutomirski Date: Sun, 3 Apr 2016 06:18:36 -0700 Message-ID: Subject: Re: [RFC patch 4/7] futex: Add support for attached futexes To: Thomas Gleixner Cc: Andy Lutomirski , LKML , Sebastian Andrzej Siewior , Darren Hart , Peter Zijlstra , Ingo Molnar , Michael Kerrisk , Davidlohr Bueso , Chris Mason , "Carlos O'Donell" , Torvald Riegel , Eric Dumazet Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 748 Lines: 21 On Sun, Apr 3, 2016 at 2:57 AM, Thomas Gleixner wrote: > On Sat, 2 Apr 2016, Andy Lutomirski wrote: > >> On 04/02/2016 04:09 AM, Thomas Gleixner wrote: >> [omitted due to some Thunderbird bug, sigh] >> >> What happens if you mix attached an non-attached ops on the same futex? > > Not much. You might get an error code, sleep forever or the call will just > result in a NOP wasting cpu cycles. That's the same when you mix > shared/private operations on the same futex. What's the workflow? Can the creation of an attached futex fail due to memory allocation problems or any other reason? If so, how does a library make sure it falls back to a normal futex safely? Why can't private futexes be attached by default? --Andy