From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by sourceware.org (Postfix) with ESMTPS id DE4213857C7B for ; Mon, 15 Feb 2021 20:03:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DE4213857C7B 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: quoted-printable X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 20:03:55 -0000 Andr=C3=A9 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 !=3D 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. --=20 Gabriel Krisman Bertazi