Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5191583pxb; Mon, 15 Feb 2021 12:06:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQea+itc8Y6jKdAZ6pMtJrP9QvvjgWcilcze2SblVxFUtxtlCAFOYEXN77q+jhtxU358ek X-Received: by 2002:a17:906:5490:: with SMTP id r16mr10166824ejo.409.1613419567011; Mon, 15 Feb 2021 12:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613419567; cv=none; d=google.com; s=arc-20160816; b=uyCDWCWJYAcXE0nFZOvEZcbS23wnblSkENKYEWD3NOc4ZrVg6BI0Vd0Z5TjmDycEn3 uYqwMDT/ziHfgOT7M26fgDVBZSGkotC7V84iTPoRB5IzA2EVxi3dONYhWYhdKggBWJXB GYNRDziosrxlY8YcyYtJw1WIEVoMcXiqIEJ0lTe10BkUb4LKLNlPsFx+3lMJvFhlUfJC MqXFD8sBEC1CP2e8kdJBrkx3Lf9yObMGKHCgN+V3AXzPMGO3iVs/gIsrDuQYRtQRVFwJ tkKyN938AKhB2zL7auDqfmPt0npa7B9YUalJlCGXZCrDceFtQVvnKYFD/KArsdKA5Cyf s7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:organization :subject:cc:to:from; bh=vWdkWdirpA6aL7JBEEk3kj/g5SEPidq9HMhlfMycyg0=; b=pGhXMEzL4CrtKrItAzk8YLP5qSnF9XaJlmIE2aGImVENuKbrqAwvs0SYsOklngnLJ7 Jsq2MUs3lSsUgZlASJT2h5K+rRth36Ssj86OIxUluN7vEM9hGyw5eqjiVeNvEDp6K48x /X66T/J1aPfQXw3DNLbTlc2FYiEfsSBwtJWKlT9SX7MpTlvY4P3BF5t+I4rlH5qhYVeu HLh7/CsbOoXw/xXNaroElPIZWJp9hupeO9QkCkfyiFEYCAClAn8Ze4Q5FoGo0anOBTg0 7FM7S4Q4OfcmeSW7VuCnfWTi6eAo4lBU5xMTWJC6cBDzPyPVvWW72qu1ciN4yS3CyvYi qugQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si16398877edi.63.2021.02.15.12.05.41; Mon, 15 Feb 2021 12:06:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhBOUEj convert rfc822-to-8bit (ORCPT + 99 others); Mon, 15 Feb 2021 15:04:39 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34326 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbhBOUEe (ORCPT ); Mon, 15 Feb 2021 15:04:34 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id AB0F01F45078 From: Gabriel Krisman Bertazi To: =?utf-8?Q?Andr=C3=A9?= Almeida Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , linux-kernel@vger.kernel.org, Steven Rostedt , Sebastian Andrzej Siewior , kernel@collabora.com, pgriffais@valvesoftware.com, z.figura12@gmail.com, joel@joelfernandes.org, malteskarupke@fastmail.fm, linux-api@vger.kernel.org, fweimer@redhat.com, libc-alpha@sourceware.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, acme@kernel.org, corbet@lwn.net Subject: Re: [RFC PATCH 03/13] futex2: Implement vectorized wait Organization: Collabora References: <20210215152404.250281-1-andrealmeid@collabora.com> <20210215152404.250281-4-andrealmeid@collabora.com> Date: Mon, 15 Feb 2021 15:03:48 -0500 In-Reply-To: <20210215152404.250281-4-andrealmeid@collabora.com> (=?utf-8?Q?=22Andr=C3=A9?= Almeida"'s message of "Mon, 15 Feb 2021 12:23:54 -0300") Message-ID: <87ft1xw123.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org André Almeida writes: > Add support to wait on multiple futexes. This is the interface > implemented by this syscall: > > futex_waitv(struct futex_waitv *waiters, unsigned int nr_futexes, > unsigned int flags, struct timespec *timo) > > struct futex_waitv { > void *uaddr; > unsigned int val; > unsigned int flags; > }; > > Given an array of struct futex_waitv, wait on each uaddr. The thread > wakes if a futex_wake() is performed at any uaddr. The syscall returns > immediately if any waiter has *uaddr != val. *timo is an optional > timeout value for the operation. The flags argument of the syscall > should be used solely for specifying the timeout as realtime, if needed. > Flags for shared futexes, sizes, etc. should be used on the individual > flags of each waiter. Given the previous proposal from Zebediah, one use case Wine has to support is the ability to wait on all (instead of any) of a list of futexes . I suppose that could be done by a new FLAG_WAITALL passed on the third argument of the syscall. -- Gabriel Krisman Bertazi