Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp236157pxb; Tue, 28 Sep 2021 20:35:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo7oe+plUSPwd80oe1+5uGhS5BA+cNMX+ihCgv/1I5za4jP5ma2FropDPN4b2LO51WGYQZ X-Received: by 2002:a17:906:25d7:: with SMTP id n23mr11073078ejb.322.1632886506068; Tue, 28 Sep 2021 20:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632886506; cv=none; d=google.com; s=arc-20160816; b=D0EPJV0U5WTZx+zpd4SiK7rR2Y/gZPBaA+I4kHDZFbvx8VI2e2hlTd+raOZEsqZeyf t6OQGyxdpZi9l1GCT2HcXgIfJff49qd4ZGGzClycsgSAeUZl+dzLX1QjtNJ0UdmuRl+7 kE5f/7uNhLIha+Wdr6cikKV0u8x9gc080dBkY93AyAEl6oJR5CnqEZ2tNKVneSmna7iD gZdu6bGzaEO/R1H59aC3JLoWb44xbi1ydPsIKsQvKFRnU08onqhVhLSsspR742+HwayQ v9hZvZit4Dk32GMsEWuqmnvqZsxU7Uy8HU4ddviGnA5a/k9BaWr0S75rV35ZxZuKjeid jbCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature; bh=8xpTgDELOPcYcDA+xJNQxtUy7IluMoxsilbV7VkAGxE=; b=x/QYCH+PbgM/AzmvVni2Ipm5f7i9YScgqxX2lduKCNk/hUAWFE9lgEtIVdSpsp+ty8 btn5tGAMBf1zwK0gt2tN9QQHWxmtfCdU/yTeDd+T17LSWphwX1pE9S2qUiqVie13mDFv 10VSmhqs4iKKI3/qj/JPsTLNw9ApudxiN5RLsxohZpfD2QE726Pwxpja4Xtpp/bPlp8W FNkgngvkCN28WXmcFfVZc4k01l3bZRvsjD2n8NsxNCO7rQ0BzFZRzTONijgjNuPNlbhT Fm1pENlImRNOp0r1JKGifbaVubYKsww8GQPD2a+TmBnNZ1MDlVUBFYtm69YUDzCFtIxF 6dJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pT1r5SFi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si1152880edk.328.2021.09.28.20.34.42; Tue, 28 Sep 2021 20:35:06 -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=@kernel.org header.s=k20201202 header.b=pT1r5SFi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244013AbhI2Dci (ORCPT + 99 others); Tue, 28 Sep 2021 23:32:38 -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-kernel@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?