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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65ED5C433FE for ; Wed, 29 Sep 2021 03:30:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CAE9613CE for ; Wed, 29 Sep 2021 03:30:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243964AbhI2Dch (ORCPT ); Tue, 28 Sep 2021 23:32:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:43344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243349AbhI2Dch (ORCPT ); Tue, 28 Sep 2021 23:32:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 188596136A; Wed, 29 Sep 2021 03:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632886256; bh=WCjXIv7h+cvI30x4kcTCUOWtS0sTzxXS+pms9WS2R5w=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=pT1r5SFiZQttdoly5ySvJ0wy9GKMU6NNZ2hQ7mllvAOTYvb/8AjrLZwqiDb6OLq1/ d4AkfvdeD7WHIx5vt8YEtfyGHi1CIV79T7L7bJfU5o2UFs9lNtwpGpBWQGO3Z+oJ1O 7Da4vhkxb+EuXfc4mdAhFFQBYwaecYP1y9g6JLy/0dqUT3qQMY/M+i4eMv0OxbzIxK PqB484m6pD9MkVptjCWWoHJvpiWONqlpwPL4DdIRe7Y9r5qOF0kRef/lgWmzYBWBl4 w0rObQEDEdeTTDoCRTbQRi7hKjcRTCX4eSE+tDOrtyFkoowFd873kkicHWxSdVIuNO Wkm87Gcu4oNjA== Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 23E2E27C0054; Tue, 28 Sep 2021 23:30:54 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute6.internal (MEProxy); Tue, 28 Sep 2021 23:30:54 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekuddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhgu hicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenucggtf frrghtthgvrhhnpedthfehtedtvdetvdetudfgueeuhfdtudegvdelveelfedvteelfffg fedvkeegfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedukeeh ieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinhhugi drlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 29AC621E0063; Tue, 28 Sep 2021 23:30:53 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1303-gb2406efd75-fm-20210922.002-gb2406efd Mime-Version: 1.0 Message-Id: In-Reply-To: <20210913200132.3396598-12-sohil.mehta@intel.com> References: <20210913200132.3396598-1-sohil.mehta@intel.com> <20210913200132.3396598-12-sohil.mehta@intel.com> Date: Tue, 28 Sep 2021 20:30:27 -0700 From: "Andy Lutomirski" To: "Sohil Mehta" , "the arch/x86 maintainers" Cc: "Tony Luck" , "Dave Hansen" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "H. Peter Anvin" , "Jens Axboe" , "Christian Brauner" , "Peter Zijlstra (Intel)" , "Shuah Khan" , "Arnd Bergmann" , "Jonathan Corbet" , "Raj Ashok" , "Jacob Pan" , "Gayatri Kammela" , "Zeng Guang" , "Williams, Dan J" , "Randy E Witt" , "Shankar, Ravi V" , "Ramesh Thomas" , "Linux API" , linux-arch@vger.kernel.org, "Linux Kernel Mailing List" , linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH 11/13] x86/uintr: Introduce uintr_wait() syscall Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Mon, Sep 13, 2021, at 1:01 PM, Sohil Mehta wrote: > Add a new system call to allow applications to block in the kernel and > wait for user interrupts. > ... > > When the application makes this syscall the notification vector is > switched to a new kernel vector. Any new SENDUIPI will invoke the kernel > interrupt which is then used to wake up the process. Any new SENDUIPI that happens to hit the target CPU's ucode at a time when the kernel vector is enabled will deliver the interrupt. Any new SENDUIPI that happens to hit the target CPU's ucode at a time when a different UIPI-using task is running will *not* deliver the interrupt, unless I'm missing some magic. Which means that wakeups will be missed, which I think makes this whole idea a nonstarter. Am I missing something?