From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08D03C001DE for ; Mon, 31 Jul 2023 17:39:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7CDB0280090; Mon, 31 Jul 2023 13:39:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7303A28007A; Mon, 31 Jul 2023 13:39:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D073280090; Mon, 31 Jul 2023 13:39:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3EE9128007A for ; Mon, 31 Jul 2023 13:39:05 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B835B1C8B14 for ; Mon, 31 Jul 2023 17:39:04 +0000 (UTC) X-FDA: 81072617808.25.1FF952C Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id 63A9B14001A for ; Mon, 31 Jul 2023 17:39:01 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="N/PvmfIJ"; dmarc=none; spf=none (imf26.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690825142; a=rsa-sha256; cv=none; b=3AVN6RUbTByu8vKIxQ1zUbFGyL2Xn62mhy2hxQHbBFKy2MQ8VlcETecFQ2F6Ykpc1ckgG2 /H5/VF2YwVJ+KwqGTMvJYeX/3wPAML7293JdIZJf/OXOpALal0c+YItU6kCWMUTqUDRG5h uUGBAK4cBFd47SO9Rj4AMsibDJ59nuM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="N/PvmfIJ"; dmarc=none; spf=none (imf26.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690825142; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FWxe5J1hE38eMUz7xvskScrwN5CGj61RpGiQj1KfL8k=; b=id1wh+RV9t20APQKS6RkfBIyKAQBJ2NOypfpidFFLquWoAT4PaslW5w44TBdMSWvwi74Yf GGm0kvws4s7ppQyn4PSucHP2GOViGqvl9enM4JdPenmHtcfd0Pn3zTTpy3MvaxiOhUXO1Z NUYHRVMRmfQVXEcReomuBdVu/FLKmPo= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FWxe5J1hE38eMUz7xvskScrwN5CGj61RpGiQj1KfL8k=; b=N/PvmfIJka0LmTfamlvuygudrb JsbinBTLLKNiq37bm5mPPAVv09JhACMF/0Xkb7VJbrwYVu2oOHZydYjUI0rzG51C7GloDM58pGP/B O8NPzkWqqzqXbvkiENP+6mMw9GWCP9lDcxrYAFFg/59l8TWowq+Yg3BkjPBLmqd4TpOJkMUKx7vOq 5MwhUEpkM23PYPrSMEL6LXc1d9KYsimAjG90HseJwi5J+UGUNqABkgUocYhXWXtTfZ9X8UkfhJubJ RjyPZo/De79puk4DXLKnGKryAlMAHfcK30fNBlCKVn/aIYrErIJTcA0NngTqsHMNyNtFvVaiHWrkQ ZzwQOeXQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qQWrA-002vaJ-91; Mon, 31 Jul 2023 17:38:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 51E00300134; Mon, 31 Jul 2023 19:38:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 366B5203C0B01; Mon, 31 Jul 2023 19:38:56 +0200 (CEST) Date: Mon, 31 Jul 2023 19:38:56 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, mingo@redhat.com, dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com, Andrew Morton , urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, Arnd Bergmann , linux-api@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, malteskarupke@web.de Subject: Re: [PATCH v1 09/14] futex: Add sys_futex_requeue() Message-ID: <20230731173856.GQ29590@hirez.programming.kicks-ass.net> References: <20230721102237.268073801@infradead.org> <20230721105744.298661259@infradead.org> <87sf94m222.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sf94m222.ffs@tglx> X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 63A9B14001A X-Stat-Signature: tcyr8so5qjhtgecq4p6ijj7gfuj7aczq X-HE-Tag: 1690825141-657411 X-HE-Meta: U2FsdGVkX19DI0qTCtWvuL9VRbt7F0HtMgvKB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82kym8vdVSuvAIzM7FCe9dCZvg89zp4LxvUn1Ka84lKWiag== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jul 31, 2023 at 07:19:17PM +0200, Thomas Gleixner wrote: > On Fri, Jul 21 2023 at 12:22, Peter Zijlstra wrote: > > +/* > > + * sys_futex_requeue - Requeue a waiter from one futex to another > > + * @waiters: array describing the source and destination futex > > + * @flags: unused > > + * @nr_wake: number of futexes to wake > > + * @nr_requeue: number of futexes to requeue > > + * > > + * Identical to the traditional FUTEX_CMP_REQUEUE op, except it is part of the > > + * futex2 family of calls. > > + */ > > + > > +SYSCALL_DEFINE4(futex_requeue, > > + struct futex_waitv __user *, waiters, > > + unsigned int, flags, > > + int, nr_wake, > > + int, nr_requeue) > > +{ > > + struct futex_vector futexes[2]; > > + u32 cmpval; > > So this is explictely u32. I'm completely confused vs. the 64 bit futex > size variant enablement earlier in the series by now. As per the previous email; these patches only enable the syscall part of 64bit futexes, they do not convert the core, and per futex_flags_valid() (patches 4 and 13), explicitly disallow having FUTEX2_64 set. - /* Only 32bit futexes are implemented -- for now */ - if ((flags & FLAGS_SIZE_MASK) != FLAGS_SIZE_32) + /* 64bit futexes aren't implemented -- yet */ + if ((flags & FLAGS_SIZE_MASK) == FLAGS_SIZE_64) return false;