Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3926729pxv; Tue, 13 Jul 2021 07:05:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKXsbzAa4AXjyuKVe+O8C1q29DgQlzRvc2r2ujCjeBnU29EAwHoJwBNyqc6Hb8PTj+W460 X-Received: by 2002:a17:906:4ad9:: with SMTP id u25mr5851145ejt.174.1626185125175; Tue, 13 Jul 2021 07:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626185125; cv=none; d=google.com; s=arc-20160816; b=j8yhGTaTmfnKRR2tk8Ojp/rWHimhjxAXbUCLbjpV3aCi6DvY/8S+Wrp0cdAhsAgYOB 5BACbphJ6SdzH7r9LcwQGaGagovntJ+E+R6IExpV3dOjWVtqR2s2cHe3NFLMAnKqzo+y NE8K1nNmnRFCgpBIG+a4ipjMsplTTpfhSefX3JERVq9/PNsPGW1oU7sbwhsQ23vzOC7z 6+fmyyevRBSp9zkHQ3BTW/Ul4r27SxeJQgjQiXX8CbQ1XCdCMT4aJDXPXFcG/sBQ6f00 6qJfYqpc33qYWkEZxTMESNbeT+bZghNcAFzGb1lyKZtT0fR+HJMzaHmcioyOLHaPYipx QnHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qSFD2FiYbEqxI6h5fJ2mcIpTOMalsYT7JNKaXpDY58E=; b=iBUn0EjYZsZI2Yvt1Otm8hNqLss4TQW/k4azWwbcpoB3G09SdBbA4b8v6Yu2f3ZZhh N50fUY1OYofhW65i7D/zhaxgodIV1x4b4lPIYcEw7ZK8Cmwh/ziGiNCNPVh57o9XAgXu 6noEw1X0bTeed9RcN9/hORIysRz708JAwoBD78jQ02nobJ7YelEti7wWZrdwYtLtEH1l UcmjeHnH4XtI8OvMycMQGa0K+fwriuYpsOUrogDYFoh87REOdG7PsgRYeW3w1AWnuMdy 24g52N3TqCDzkj1Sq00fnFC/FTjCk91szhYgCTBl5nPsp3GiHPwbuGydTW+Pvr+D+OYa oxQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=CDYriJnh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si1389367edr.89.2021.07.13.07.04.31; Tue, 13 Jul 2021 07:05:25 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=CDYriJnh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236758AbhGMOFn (ORCPT + 99 others); Tue, 13 Jul 2021 10:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236720AbhGMOFm (ORCPT ); Tue, 13 Jul 2021 10:05:42 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF025C0613DD; Tue, 13 Jul 2021 07:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=qSFD2FiYbEqxI6h5fJ2mcIpTOMalsYT7JNKaXpDY58E=; b=CDYriJnhZwpQn6mou8CszAUrn0 OjUPAxBcuDlSKNNvz5PSIx8wbOhUFZqI9b6D4FX+opmEoN3+qiG4ojWMmu7RVIrx8sRLWbv6peSzi G37dUTQTfE7Xg3nvLliIdh+9XzZwraMv1vzrQoXSn7xiw5mOBmLgpTqp4CiF5Jjj8rxGwQV9J4Id7 3elRe4nzVVhlTGgmV7y6jE7V45HTrxWiSTvt9GfhF6tWYNHn+CFH5WGEaLcwIcaLJ85TY7TA07EMy H49Kv7nuH+m7pxQeTzz7uQiFwTCKZl7m5brZMjB+MoG3YcQQVDijaezFRtV8XQvBRmPJ5ZcLYA8up 16Qf0ePw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Izc-00HAhl-GN; Tue, 13 Jul 2021 14:02:36 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 52A8D987782; Tue, 13 Jul 2021 16:02:35 +0200 (CEST) Date: Tue, 13 Jul 2021 16:02:35 +0200 From: Peter Zijlstra To: Peter Oskolkov Cc: Thierry Delisle , avagin@google.com, bsegall@google.com, jannh@google.com, jnewsome@torproject.org, joel@joelfernandes.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, mkarsten@uwaterloo.ca, pabuhr@uwaterloo.ca, pjt@google.com, posk@posk.io, tglx@linutronix.de Subject: Re: [RFC PATCH 3/3 v0.2] sched/umcg: RFC: implement UMCG syscalls Message-ID: <20210713140235.GE4170@worktop.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 12, 2021 at 04:31:01PM -0700, Peter Oskolkov wrote: > On Mon, Jul 12, 2021 at 2:44 PM Thierry Delisle wrote: > > So what I am asking is: is UMCG_WAIT_WAKE_ONLY needed? > > Because the approach you described has been tried last year and was NACKed: > https://lore.kernel.org/lkml/20200722234538.166697-1-posk@posk.io/ > > In short, futex maintainers do not want to touch the existing futex > code at all other than for bugfixes. No new futex functionality, > period. See e.g. futex2 efforts: > https://lore.kernel.org/lkml/20210603195924.361327-1-andrealmeid@collabora.com/ These are two orthogonal issues. We do not want to make the futex multiplex monster worse, but that's not the reason for rejecting FUTEX_SWAP. The problem with FUTEX_SWAP is that it doesn't even begin to solve the posed problem, namely N:M threading that natively allows blocking syscalls (IOW without wrapping all syscalls). This means we need kernel->user notification of tasks that block and wakeup, such that the userspace scheduler can adequately react. This is not something that sanely fits in futex. It also requires an additional kernel side block point such that tasks that blocked in-kernel, will not resume userspace when the userspace scheduler decided to run another task in its stead. These things are what resulted in UMCG.