Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp265641pxb; Tue, 28 Sep 2021 21:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4+kaDkfhwPrIXUMtT7GXx/VcqQfJWIWztQJhWFYpqYyKzsua1zR+3PkPNNmABdj062P9d X-Received: by 2002:a62:d11e:0:b0:446:d705:7175 with SMTP id z30-20020a62d11e000000b00446d7057175mr9267753pfg.74.1632890117053; Tue, 28 Sep 2021 21:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632890117; cv=none; d=google.com; s=arc-20160816; b=vFNKExNWpi1jaLi8aFcTFZtP8v67ah2SUMrwWaIzQNIvHT8CxwxK0n5Lx80kh+zfmQ XYWVw5e+G1qNfUnx2qWAiyy3JLhh+/7d088ba/ko3dTd7U3ynkMwVnG9LJX/+A/Wy8rZ PM7zPw3rTChVjsdno8XjzjWFPzNggLf0K+yZfqSJXfybzxKWaLiijx185Bva+YvKdPpS 32xi8JzlYz9JIwTUC1R4rXoJkcMXrqc9r/3YhvK+0Xmm1/FIh1yCfCRA3kGFwmL9lkhR ZQ7oWlb9UZXke+pikCJLAD74/WFS3qVE/SY6LLxzC33j0tKmLMESKpyc9ydlP45OBxwG TDdQ== 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=BA4Q984PKGDUwZnGnYFi6OR/rIhHLjZXEEIdRk8pCcE=; b=zzD3Fd9PPOqXOG62CDFkfUaHHmjh4l7T0U04mG9iKylc4Mrj5BcWySJMSjv/3kP+Xw kbdy7t0QcYa0ARoE5ZowH+Bx/Us87o3CGtB/SeSGdLcA3XGIZ/cjFHJ32FQ/hYCvZ+JX iBHmgzSc2bu5i4AxVqMOMvl332yZFCr39hF/5tn9uX9uNB8drNwkv0CjGKmIpNZxw+SE kKH2JoYzJEmHYIEF3HKr/j83w81/NDiNH0SI0oPUum31oa+n8whngd+uzyILvjzRzXIZ ODri10BsI9zDl3izVX4G33E/VP7YrKuZwHXL0hkO9JFJ//PjBinSJAx9G0+IYWG4Jp8F riig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EK+ZaX3R; 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 nu6si476808pjb.68.2021.09.28.21.34.45; Tue, 28 Sep 2021 21:35:17 -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=EK+ZaX3R; 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 S243934AbhI2Edu (ORCPT + 99 others); Wed, 29 Sep 2021 00:33:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:50754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233412AbhI2Edo (ORCPT ); Wed, 29 Sep 2021 00:33:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F3FC611BD; Wed, 29 Sep 2021 04:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632889922; bh=0JwZBuC9ISIKWkfaCHpZoe2xKe6eZgUj8P+e9dRgmcA=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=EK+ZaX3RZ98lBZT/cEE3maXj+cA8JmNET5/gOuKZsMKKbXgo21lvmEuXLkapNfJ1F nCe+LZxlq7xsF7LCPUxhcSTjYuhTX0elDTzppiQ/BtSOV4ubsa2kSQNdb/vvi6gcS5 NEXm8GIF+c/VBbwEODTij153Ke8nIzKLXyLwwEpA8cISVqvPTyMRSqXx+eiVrxTFXN UxgFt4fZa91b4KbOgWiZkU2l6+gzvlSSLeZFvLotJMyd696M7IEkMFCaH2on21+nXb XsJo2rTuoDydcSJflndUnzajwyqp8jgEAU8BgOHjHYO8DZstSK11aWk1FBylToTu3U pbVpY+rhZ3Olw== Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 5C7E327C0054; Wed, 29 Sep 2021 00:31:59 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute6.internal (MEProxy); Wed, 29 Sep 2021 00:31:59 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekuddgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhgu hicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenucggtf frrghtthgvrhhnpedthfehtedtvdetvdetudfgueeuhfdtudegvdelveelfedvteelfffg fedvkeegfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedukeeh ieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinhhugi drlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6378621E0063; Wed, 29 Sep 2021 00:31:58 -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: <456bf9cf-87b8-4c3d-ac0c-7e392bcf26de@www.fastmail.com> In-Reply-To: <20210913200132.3396598-1-sohil.mehta@intel.com> References: <20210913200132.3396598-1-sohil.mehta@intel.com> Date: Tue, 28 Sep 2021 21:31:34 -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 00/13] x86 User Interrupts support 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: > User Interrupts Introduction > ============================ > > User Interrupts (Uintr) is a hardware technology that enables delivering > interrupts directly to user space. > > Today, virtually all communication across privilege boundaries happens by going > through the kernel. These include signals, pipes, remote procedure calls and > hardware interrupt based notifications. User interrupts provide the foundation > for more efficient (low latency and low CPU utilization) versions of these > common operations by avoiding transitions through the kernel. > ... I spent some time reviewing the docs (ISE) and contemplating how this all fits together, and I have a high level question: Can someone give an example of a realistic workload that would benefit from SENDUIPI and precisely how it would use SENDUIPI? Or an example of a realistic workload that would benefit from hypothetical device-initiated user interrupts and how it would use them? I'm having trouble imagining something that wouldn't work as well or better by simply polling, at least on DMA-coherent architectures like x86. (I can imagine some benefit to a hypothetical improved SENDUIPI with idential user semantics but that supported a proper interaction with the scheduler and blocking syscalls. But that's not what's documented in the ISE...) --Andy