Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5674472iob; Tue, 10 May 2022 00:34:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZOgqvXgnbGqyXpx/Vo9+GSbd0rn7DLt9s7C6qo2WdTP+9UUeTWCPRMbSoR3D14goDZAwk X-Received: by 2002:a17:907:2ce4:b0:6f4:352b:bb9b with SMTP id hz4-20020a1709072ce400b006f4352bbb9bmr18048442ejc.398.1652168072648; Tue, 10 May 2022 00:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652168072; cv=none; d=google.com; s=arc-20160816; b=E996s4+t/x7W1Y082pIcxbm0Lhx9pSj42RF5tgSuSAkQV49o9A1xeeA0JMxa92eX5Z I31GmGd7Tq2/vAlyUwY1+wlWwrUmZLrVwgy6O6JdTYVTTOHcNcOOXgcKpm0s5ZAJde1G G7s4vyPCvVR7tGAqCfoRxUqoLaPugbZuHl1JBCwEROUfXrAc9PPmVlL1grh/FplNx4/k qtWNxWAUVcvtFVYN8F4uWPBvrPzUOSQayo6sgI4K7p8rZThU4CSuDkd+MGDWECr5T/eP 0Cp8jW4GydzJNwf73A+ePKIEu2P5Ztb63jp0wJyXBED49dn3AEnOzSR1mKcdiBV2CS4F ItGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=VB+S7FbsbedyfQegYcDT9rEqTeQpA5DhiVtlZtTEzpM=; b=FbGRuFBCiK8zgstRLXx5mW7dSHjjET+FFBXL5/SVV5H5joYyYhM8f6bIuy3vyUiIQx NrfX1Ff+O/1ptm+HHe16Wi6oe07B4up/yE6EKzkVG5POGHq//7r3dwwePeTsSdh4ywJ8 JvRacXyxzxJ9euA/+R6tFkjCgDB2N+dpkohcHP1Cdt9j0Aple5cZr1l2utGu/JaJu+za 2PesueBUe+0NvjY9QJSZb/HFCsUYAHeNNlrDIPAoMIdSsYEux2QIf2vYUolPUm90QULT nfZfj784ujSR1GG+KQjvI2QulPkOuBA8OYDe4+i67O0Su0n1am433ub4LNA2PSySvuSY isFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=couAxsUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j23-20020a17090643d700b006df76385d42si16362739ejn.482.2022.05.10.00.34.07; Tue, 10 May 2022 00:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=couAxsUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233367AbiEJCdx (ORCPT + 99 others); Mon, 9 May 2022 22:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234895AbiEJCdf (ORCPT ); Mon, 9 May 2022 22:33:35 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2DB1C345C; Mon, 9 May 2022 19:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652149778; x=1683685778; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=VB+S7FbsbedyfQegYcDT9rEqTeQpA5DhiVtlZtTEzpM=; b=couAxsUKykYDw9d7hoseJH8jnF0OA7Bi/ohZ20paXcWf/4dGwwwaCHdB oq/9YtJlsTXm0faO6dbveKlFEhH0gtJK0fQw48mIgPAnH8zWmEIfpvQFT On8Fti8ZzDkO1Yyfq9bXbeklQ6NB+8C8lebuw1U0RECjuA1exwjRKh4+w k=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 09 May 2022 19:29:37 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 19:29:22 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 19:29:21 -0700 Received: from [10.226.59.182] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 19:29:20 -0700 Message-ID: <8372be1c-5f7d-3a0e-38fb-787b9d38fcd9@quicinc.com> Date: Mon, 9 May 2022 20:29:19 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 1/2] PCI: hv: Reuse existing ITRE allocation in compose_msi_msg() Content-Language: en-US To: Dexuan Cui , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , "lorenzo.pieralisi@arm.com" , "robh@kernel.org" , "kw@linux.com" , "bhelgaas@google.com" CC: Jake Oshins , David Zhang , "linux-hyperv@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1652132902-27109-1-git-send-email-quic_jhugo@quicinc.com> <1652132902-27109-2-git-send-email-quic_jhugo@quicinc.com> From: Jeffrey Hugo In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/9/2022 5:13 PM, Dexuan Cui wrote: >> From: Jeffrey Hugo >> Sent: Monday, May 9, 2022 2:48 PM >> Subject: [PATCH 1/2] PCI: hv: Reuse existing ITRE allocation in > > s/ITRE/IRTE. I suppose Wei can help fix this without a v2 :-) Thanks for the review. I have no problem sending out a V2. Especially since you pointed out my mistakes on both patches. I'll wait a little bit for any additional feedback, and then send out a V2. > >> compose_msi_msg() >> ... >> Currently if compose_msi_msg() is called multiple times, it will free any >> previous ITRE allocation, and generate a new allocation. While nothing >> prevents this from occurring, it is extranious when Linux could just reuse > > s/extranious/extraneous > >> the existing allocation and avoid a bunch of overhead. >> >> However, when future ITRE allocations operate on blocks of MSIs instead of > > s/ITRE/IRTE > >> a single line, freeing the allocation will impact all of the lines. This >> could cause an issue where an allocation of N MSIs occurs, then some of >> the lines are retargeted, and finally the allocation is freed/reallocated. >> The freeing of the allocation removes all of the configuration for the >> entire block, which requires all the lines to be retargeted, which might >> not happen since some lines might already be unmasked/active. >> >> Signed-off-by: Jeffrey Hugo > > Reviewed-by: Dexuan Cui > Tested-by: Dexuan Cui