Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1391504pxb; Fri, 1 Oct 2021 09:38:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyFQQNSSVnFbaATCebNd+a4W12hHwCYszvvE+1fLTmFFXN7Hbo3LAv5FM5UYcjAIiwGfcm X-Received: by 2002:a17:906:31ca:: with SMTP id f10mr7124211ejf.73.1633106293224; Fri, 01 Oct 2021 09:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633106293; cv=none; d=google.com; s=arc-20160816; b=WiD0XsryTtfndiElxqqiv4gG/zrDWzhyzN9KIPmWEDqxStAq0hoWJxpWJN9/KKIS5N PpHfcChHslw4IU9HgSDjVnXsRfIrP69PyVsuC81PbwwXVkz1Rgs+8GbD7fm5UaSqvR06 iya11dr7SCqNG/CYLZQfWOCwcvAToHeFKBDNebEJdvbGghNkX74lYV0TRDCPKjblNmpG I3JJZs0ygG8E11tMdEAGVaZVVAC0V8OC7ULU9197jzK692S5JHvNvb9GzLoxOogSGe9x XIYucgwqA1O6q7YyoImZnLhd8J50hHVvNqUvgBcKKT0yf7XQpL/tD3nhDY3huU4hD+r/ EKNg== 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=pu/Lo/8PIcVP2w18pMUuKpKdni82TYWbWCVM3bXJdyE=; b=QjgBGanCjqMlelYkjPRep1bysvPODv4Cyk4uETOHoOabGAOLw4xBmzrLSzofjKVTVd TZTvajl8bP2k+RxD1BHmzvxasO/wz3pb0fdRnJJ0PxDKXApzraQ7O8Ma7PxcaKargfmS FvsXuPY+TmF0qAimOIdjUl2K3srHZdJoOLfdKfs0rjaRdVbeAMHEtEIRDoV3GQP0w3q+ Qx9Mc2swsx9A92efu49r3aww8HsLokCH4fiCfxF3b5GdY8iNm5BxIMGUsrxwSQdkI9hq zZmr8V9N02n0RC6owNYDlsgwwVnKtgF6EaLyFPp8oc2AU6s8fZuB3D7iOjN0OzoCC4ro eIOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E50guQeg; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si6792780edx.318.2021.10.01.09.37.46; Fri, 01 Oct 2021 09:38:13 -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=@redhat.com header.s=mimecast20190719 header.b=E50guQeg; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbhJAQhx (ORCPT + 99 others); Fri, 1 Oct 2021 12:37:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35084 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355046AbhJAQhw (ORCPT ); Fri, 1 Oct 2021 12:37:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633106167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pu/Lo/8PIcVP2w18pMUuKpKdni82TYWbWCVM3bXJdyE=; b=E50guQegsNAcTypCsesfZ4T8nHgAKg6ZFE6OvmmsdD9OpFCmWCGt5Pr4pF5JggfesTx1Ow JHFp2O6I7cJdgBbTpHotbcajt04dH5Ch/4fGEQVnmnU4x+1pkS8E/+bOIcqfcUi2MYJ/0H T2cip+u+dyu9NfX9daiVrYM2eHmy0jo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-382-Gq9idoBgPeePeb96LPjoWQ-1; Fri, 01 Oct 2021 12:36:05 -0400 X-MC-Unique: Gq9idoBgPeePeb96LPjoWQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 639F119200D3; Fri, 1 Oct 2021 16:36:01 +0000 (UTC) Received: from localhost (unknown [10.39.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id B5B51608BA; Fri, 1 Oct 2021 16:36:00 +0000 (UTC) Date: Fri, 1 Oct 2021 17:35:58 +0100 From: Stefan Hajnoczi To: Sohil Mehta , Peter Maydell , Alex =?iso-8859-1?Q?Benn=E9e?= , Richard Henderson Cc: Andy Lutomirski , the arch/x86 maintainers , 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, qemu-devel@nongnu.org Subject: Re: [RFC PATCH 00/13] x86 User Interrupts support Message-ID: References: <20210913200132.3396598-1-sohil.mehta@intel.com> <456bf9cf-87b8-4c3d-ac0c-7e392bcf26de@www.fastmail.com> <778d40fe-ad8e-fd7c-4caa-499910bb0925@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9EVyQ6g1a8JZP43O" Content-Disposition: inline In-Reply-To: <778d40fe-ad8e-fd7c-4caa-499910bb0925@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --9EVyQ6g1a8JZP43O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 30, 2021 at 10:24:24AM -0700, Sohil Mehta wrote: >=20 > On 9/30/2021 9:30 AM, Stefan Hajnoczi wrote: > > On Tue, Sep 28, 2021 at 09:31:34PM -0700, Andy Lutomirski wrote: > > >=20 > > > I spent some time reviewing the docs (ISE) and contemplating how this= all fits together, and I have a high level question: > > >=20 > > > Can someone give an example of a realistic workload that would benefi= t 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 so= mething that wouldn't work as well or better by simply polling, at least on= DMA-coherent architectures like x86. > > I was wondering the same thing. One thing came to mind: > >=20 > > An application that wants to be *interrupted* from what it's doing > > rather than waiting until the next polling point. For example, > > applications that are CPU-intensive and have green threads. I can't name > > a real application like this though :P. >=20 > Thank you Stefan and Andy for giving this some thought. >=20 > We are consolidating the information internally on where and how exactly = we > expect to see benefits with real workloads for the various sources of User > Interrupts. It will take a few days to get back on this one. One possible use case came to mind in QEMU's TCG just-in-time compiler: QEMU's TCG threads execute translated code. There are events that require interrupting these threads. Today a check is performed at the start of every translated block. Most of the time the check is false and it's a waste of CPU. User interrupts can eliminate the need for checks by interrupting TCG threads when events occur. I don't know whether this will improve performance or how feasible it is to implement, but I've added people who might have ideas. (For a summary of user interrupts, see https://lwn.net/SubscriberLink/871113/60652640e11fc5df/.) Stefan --9EVyQ6g1a8JZP43O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmFXOO4ACgkQnKSrs4Gr c8j1LQf/SZwCRlCZlWue5FvVhDmWF//uX4PGQQMaisI7h989XbCnOAuKgojBX/CZ juXKMDJAuLrBR85BOl/7mEz/bM4m1b7pkMq4GR73ER/5/aupQv/yldA+MPklTyzQ 8DXcmTsApJk7CQvCOheb6CWKwtCZ0pkZu12vnk8w+IiL601ZYzyWr/wPUFCjxWXa GjqeLxGzpHjczrw4f9zjTsheGhZaX7TVLh6ULQ2dsLxIRXw+23tQPmCd19mAh0Oc Zgg/Mk4la+cNm5RXfdSTbunqafjGQLeNYBRLMA4DzigKxeU2wCULezW9ZLN8LJ6u MNGacFSLGXxsd2Waa5fBTjGyji5qwg== =GlvG -----END PGP SIGNATURE----- --9EVyQ6g1a8JZP43O--