Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp42414lqp; Thu, 4 Apr 2024 06:45:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqgEgClTTxZbdJrb644XqKhHCfxr8D4NSSu9Eox7EPeCCDYLhw6hunL5x6VsnxY5e54SKoo43t524yaZPjEsS0WCFHsCVkXAg1A2Us0g== X-Google-Smtp-Source: AGHT+IGG3+EVJP4SPm9qS1UJTaMCj4FDUK66SELvUdlDu5rmUCK6ASHjIDFnB66lY28dllKEQX9X X-Received: by 2002:a2e:9141:0:b0:2d7:10a1:481e with SMTP id q1-20020a2e9141000000b002d710a1481emr1934118ljg.31.1712238328772; Thu, 04 Apr 2024 06:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712238328; cv=pass; d=google.com; s=arc-20160816; b=G24tNKYbE8a8DRfFha1pYQvIGPKJ2LmfsksWpbkkQyOzIhRtMoBHbKd78AOyAgmDvd tXqSUS9BuCBEAz0C386ZB3Gr+J1MNHQwDw2bdb5MkHMWmDViu15ROWu6y3d8hedil99c oDP3Ft11lUGT4eXPaPriNDDT+kbobkXi1xK6oSPAjWRtrLoq3TI5QL5cvqjVBRH/8Ch9 3MZyZgMTHH/fz5D5rR8pDs7Xfa6qRNr1zKDlmPyD9cdcv1dBTrL4fn+5YNY/JClAU62k /oU9TC4rq1qbdSHeY5mpUc2HyqxabQq3NnXM1s/P6MgFqfpT3DqNLE2JSbXZnZEhcdir VsJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WxzZmInBFuAtLU4NoG0liW28RCj7raug1tFQ+0Qn6gc=; fh=xJtbAp7Z97NNh0WY0SCPPW+LrrMcAOwCRTaPQ1mdyiw=; b=oiKFQVrl7N/zVTVtebTWd2GrP9BW0n+TP+Cw1F8WleRzDw6FIN94WOD48SwZEQyh/I 0YkATj97tJY/bPPN6PNzW5W3rjNdP6GEM9Oxe8bG1pUOU+boFvLqm515yReRr96zfMCB wR54o3KWdQ9XXaCzKDHtMOqW3s3K/xuFT1YMicMEFHjNd9b1zb1ATiNBvNBjEhPqI3UJ EDTXnjVTU+QZ+txjuRnR8seR89uPtLoO4WplDg8QZ+ds2HpWkUiijF45jBf+7PwaOcT5 /EWxuZBCWlydjuHT0TELNBwc/xG+gUgpqCssaoyr5uOIG1ZOGk5dO2/9ErywGD9451ty lq9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AaOMsiCM; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-131524-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131524-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t26-20020a50ab5a000000b0056e06f02243si1676590edc.86.2024.04.04.06.45.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131524-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AaOMsiCM; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-131524-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131524-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7A2191F2210E for ; Thu, 4 Apr 2024 13:45:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B74E128396; Thu, 4 Apr 2024 13:45:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AaOMsiCM" Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38DCE85644; Thu, 4 Apr 2024 13:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238317; cv=none; b=bYYq4XFKYSvBW9E1hKjyuHr9h4QTi8YrPpVS66RB/TAB4sSqv+8APyLTMyVdCLvAHYiwg3ymhPty4c9TnFb5BXI5066uBCnTcDbIrXSj0+89LeviHk2khMSys3slBREuEmafLPQOHuXxfM16i9TTcKoDcTVq0EJJ3T8goZ5IF3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238317; c=relaxed/simple; bh=eNFxWhJpWGn4MVKyzZRbjgkh8DaGFUxZWhNvYbMxGkI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dmBWMyIBqQkW6Ej3XHSuZAaKIrrBCAz9++Xktpk5syhfnUQoVerKPN1wPDr28ii7VeTeyP61DjO6H2n3tQFVxAOBueB1HX7TvcPF1TqgsonqxGamFNHCVYMgZomIoG+oOMkOBGxcbVWuWYlZodqri5VDPSd11c/yPlqXIsav8x4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AaOMsiCM; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2a2da57ab3aso373962a91.3; Thu, 04 Apr 2024 06:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712238315; x=1712843115; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WxzZmInBFuAtLU4NoG0liW28RCj7raug1tFQ+0Qn6gc=; b=AaOMsiCMllr0ywB+3KRStqmw9umxWIGSm932/ZyMlENms6urkXC2Tsk4cIUdLlMY79 xRf5m1dumbNOrM+wUPv8ozHeg4+L5RZjNHbqojKeXwlGSzxjmUbjyBksrf0iV7s++do/ aXNWGFoPL7tv9+1dsbzHVfdodZH09nD68P7wU0maN/6vy7s/8VuGrf8EsCIR9u3630vR 4grNazG4lQln6LhovvJj1r/2lCw5xsMOlzGSmdqESaMjbGAt7PmfAux9aW7Y1JIInJdZ 4qRr/n03BtYjO1c9p/gQEH9RkQVxSUGb3VDKk07DF76eumd0dqWBy9rtfABQOFgAnT8X gEHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712238315; x=1712843115; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WxzZmInBFuAtLU4NoG0liW28RCj7raug1tFQ+0Qn6gc=; b=XV39LzC+W6ILO9Mi7DBIKk6UmeWrrmPdCE2p1xg/UnMCqFSxSZH1Knf3pwE7I+9V+O SyYbADN+iL5Uwhyfdh+n0sgIjc37rRp5nd+tWihsYqBDVDH/Fgo7BLMZQcM99Gz8ZBTH 68vl8Ec1EUVj7/MT3cL13RoRGu5KSbIy25p7e2QA2XxTZ+RcMA6ClOIfbFNWlAN2io0o 6ld/vWeZSz7V9uFD+9aS18a2JaxNKTOTNsM/YPQHmCg4/Crdb1jYt1TUiF8hCqy0VACF vaFWyER1Ml0TnIqQi0QzkoeackSsr10fJWJw7NSJdlyGEHREbeH74+saDMaTM6kfVyrf gMhQ== X-Forwarded-Encrypted: i=1; AJvYcCU8MUDCM3fUUt7EalKhPMPdfbctyisTySdRuUaF9INa5mag7yLOLYIdgkMQeG9n9jwmNk7t45m4aMjukXyM528aG7KNq2arccMEQRlIVZaGvvCvjTeqxrmS3UhdjUmGHDdR X-Gm-Message-State: AOJu0YxEGBx+8X0TGzh44gCye3TMAvkBQVV25XTA5aKkC2k9BIkP0ULn D1Fv6yE+D12umR8C9pdGrJ1NhGHCbGYw48bukU4s7+6j0lJXarg8 X-Received: by 2002:a17:90a:17cb:b0:2a2:c430:fc30 with SMTP id q69-20020a17090a17cb00b002a2c430fc30mr2515476pja.21.1712238315089; Thu, 04 Apr 2024 06:45:15 -0700 (PDT) Received: from [172.27.237.1] (ec2-16-163-40-128.ap-east-1.compute.amazonaws.com. [16.163.40.128]) by smtp.gmail.com with ESMTPSA id d4-20020a17090ac24400b002a2fe0998f0sm54885pjx.19.2024.04.04.06.45.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Apr 2024 06:45:14 -0700 (PDT) Message-ID: Date: Thu, 4 Apr 2024 21:45:05 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/15] Coalesced Interrupt Delivery with posted MSI Content-Language: en-US To: Jacob Pan , LKML , X86 Kernel , Peter Zijlstra , iommu@lists.linux.dev, Thomas Gleixner , Lu Baolu , kvm@vger.kernel.org, Dave Hansen , Joerg Roedel , "H. Peter Anvin" , Borislav Petkov , Ingo Molnar Cc: Paul Luse , Dan Williams , Jens Axboe , Raj Ashok , "Tian, Kevin" , maz@kernel.org, seanjc@google.com, Robin Murphy References: <20240126234237.547278-1-jacob.jun.pan@linux.intel.com> From: Robert Hoo In-Reply-To: <20240126234237.547278-1-jacob.jun.pan@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/27/2024 7:42 AM, Jacob Pan wrote: > Hi Thomas and all, > > This patch set is aimed to improve IRQ throughput on Intel Xeon by making use of > posted interrupts. > > There is a session at LPC2023 IOMMU/VFIO/PCI MC where I have presented this > topic. > > https://lpc.events/event/17/sessions/172/#20231115 > > Background > ========== > On modern x86 server SoCs, interrupt remapping (IR) is required and turned > on by default to support X2APIC. Two interrupt remapping modes can be supported > by IOMMU/VT-d: > > - Remappable (host) > - Posted (guest only so far) > > With remappable mode, the device MSI to CPU process is a HW flow without system > software touch points, it roughly goes as follows: > > 1. Devices issue interrupt requests with writes to 0xFEEx_xxxx > 2. The system agent accepts and remaps/translates the IRQ > 3. Upon receiving the translation response, the system agent notifies the > destination CPU with the translated MSI > 4. CPU's local APIC accepts interrupts into its IRR/ISR registers > 5. Interrupt delivered through IDT (MSI vector) > > The above process can be inefficient under high IRQ rates. The notifications in > step #3 are often unnecessary when the destination CPU is already overwhelmed > with handling bursts of IRQs. On some architectures, such as Intel Xeon, step #3 > is also expensive and requires strong ordering w.r.t DMA. Can you tell more on this "step #3 requires strong ordering w.r.t. DMA"? > As a result, slower > IRQ rates can become a limiting factor for DMA I/O performance. >