Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5185580rwe; Tue, 18 Apr 2023 03:24:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bMeUs/7iYZRUWzn/a7ZNDZRo0Ko15kyhRIDZgo3xhEcN1vHufdIfltu+nVi3Nq2VvLXwO+ X-Received: by 2002:a17:903:186:b0:1a6:84be:a093 with SMTP id z6-20020a170903018600b001a684bea093mr1887021plg.51.1681813496981; Tue, 18 Apr 2023 03:24:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681813496; cv=pass; d=google.com; s=arc-20160816; b=Y5BmR1RciLkI0sLsqne672BL7UJEy+IOZwNhklv3ohOHfs/nch42+yJcttJwxpn903 8B4BQnPLv9Pl/Ggwv2y88t7yl5LQBINq3eL+zvCt5HaBtgxt6W3fPx24VfCeKf/X/uSz aIycZAua7qPbyp10c+/asDiPsyNgXiwznmgcQB/K7YdrBaLjxEn43n1Z7+aSZE3xkWep ZW+TAdxaQp8tfSmkCb+HogoBOPLf2TAsnvYvpWf3PDbZS3pOyVmiUQHhZdvoyQ1LXwSU 90u/6l6lBEeqk+VCcz3B1RUgqsAlLtpuaA73FhH5Ea6k0xeoHS+QVfMnpGz++AYyqRsY a18A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=L2yAxZmrXKDBlQLvIp+OKkf9NqVRUiTUa/7o5cF5e5Q=; b=oV83OexoqMKX6mpXdj5K8XMeT2JU9XpGQGfTZFMnLhUlxIs4u8w91ZJEBt6xPOthB6 +r0zWqkVVCWnGkf9/QXOHzmhnvkgdzXm8BafJNreyRczqPcGrTAG780tUnH4pmurD8yF zs7421Ie/4zHQEbMuk7lSf+Z+NIW/Who0h3vAFLQpDDNflt40ojGZgjqMGo43tORO4O/ nivvyVwBI7bY0OYsBcZ2C8C59WE9p+2Xn73MqXKK1niCEUV5+TX5YIA0v65KSydDhNyW Y+/HZTwVQOGyk8rJn+s1RgaM+YkkkBFTguVqbhYcMpUYJFVEYxqMD2Sqk01/gzPxN23m QQsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=baSkULnd; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="bq/82f7f"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a170902b70a00b001a242dbbd27si13432051pls.513.2023.04.18.03.24.42; Tue, 18 Apr 2023 03:24:56 -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=@oracle.com header.s=corp-2023-03-30 header.b=baSkULnd; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="bq/82f7f"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231367AbjDRKVI (ORCPT + 99 others); Tue, 18 Apr 2023 06:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbjDRKUi (ORCPT ); Tue, 18 Apr 2023 06:20:38 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41D4902F for ; Tue, 18 Apr 2023 03:20:13 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33I9dlpE015756; Tue, 18 Apr 2023 10:20:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=L2yAxZmrXKDBlQLvIp+OKkf9NqVRUiTUa/7o5cF5e5Q=; b=baSkULndm8iJD4SZl3YWj6mNblxjKVpCnywP2zEDLCLp9sLr+TXhiKHySd7xYCvUDIuP 8u5nlHJV0i22NLRXCjYpQHg4z0OQo7lqIjgXU7VwGoj0SvvaZVly2a/7bpI0x8sJWDR4 ZWJq/bEhHcOH45Ki3dW7lr35UCTZJFb3RYVFG72/L5YqujjumyL8RBrku9ep6uMOxcns CvsVgKyI9ASumPoWI7wpAjGIuMhZ9x1a8Xed72iZI0pU6oWS6ccSqc7o14yDpNM4TkRU 1u66bFcBYZAQUUPUvvBbteydi/mgoOHkcdkUWWs0sVpK1GxGXSh9Hxf8ZlaWlnEDANiF RQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pyjuc5bm2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Apr 2023 10:20:00 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 33I8LINU031988; Tue, 18 Apr 2023 10:19:58 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3pyjcbax86-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Apr 2023 10:19:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BaXRmNXMfWAMe3/jGbhbTH8alXP+8qOaX7uy5cS1DWmW/yo4fCtDDccbkKFoPDvia3HUApTodwZdEm7DGD55eTNrfQxxMkaCLyXZUXJgV4uTHHmsKhiWKOeBpoxr3m3diKqNB2Dad0F5IPp+HYin3HGQyEslYvkdXRFmYoYBfnr1BeMlpAD+KQ+ChoxGtaH1TgwckBJpvqHcu7FxCzI7sDqCiY71P5v6Zkhp9/tx7J7GX4x63VFokSBuK3iiyEkWqqBpeY4idnjIIdfHFKk9wBVaCuDNsesy0wAvIN1MX+5fOQrOqsmDeozaY3VNoqqWhCj+veU3YRGu2THEGRwYeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L2yAxZmrXKDBlQLvIp+OKkf9NqVRUiTUa/7o5cF5e5Q=; b=jL0u+LkDE6b3oI0Cfq2nnN4o+OnqkZrgxEFCwHSFcxRjXeECQ7xcWvsOlMMDa6iSfijGdOAU/w4nZkCdxVrkqUjPAgCZ4DLPftSesP2oqoHH3KvVnL3wlsjUZH5VSKVpsdbTgYjn/Z+7HAppzAD7AXIb+rE2PudFIV/5RbjgwUwdI8idZYj6S/x71BMlPIvp8VMz0fDlJVvhnCubWwhjehOilC/oWplLpKJLj5K3COyRUahQGs8mLKEB7vsNWMljw//FxUUUHfuOQIhmxYHD78a5GXbTAxxrKWt3vFSzIh9YbLqSxTeppjZGGxwMUU5JdW8GOFwnKu4lgQpLYbqk/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L2yAxZmrXKDBlQLvIp+OKkf9NqVRUiTUa/7o5cF5e5Q=; b=bq/82f7fDrejH97koPbuRU1vlX49DjUCy2YGwOPmJmyzDzvlqMmDsoOw1reyq2Xg3tTqujLDrh2oUN8Q26iuFgVRhSWYXP8FdzD59N4D/BOej/tVrunaaX1T6lbdsNT1JIGGDDCzQNLNNnu+417e4bsq/ioMcidrMa6G4nSvFcs= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CY5PR10MB6071.namprd10.prod.outlook.com (2603:10b6:930:39::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 10:19:56 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::8456:ba59:80ec:d804]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::8456:ba59:80ec:d804%6]) with mapi id 15.20.6298.045; Tue, 18 Apr 2023 10:19:56 +0000 Message-ID: <6b14b2a0-cf1c-fbfb-5028-d7a6974ef39f@oracle.com> Date: Tue, 18 Apr 2023 11:19:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v4] iommu: Optimise PCI SAC address trick To: Vasant Hegde , Robin Murphy , joro@8bytes.org Cc: will@kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Linus Torvalds , Jakub Kicinski References: <21e49cd7-ee15-5ebd-7805-37d5f347635f@amd.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: <21e49cd7-ee15-5ebd-7805-37d5f347635f@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM3PR07CA0071.eurprd07.prod.outlook.com (2603:10a6:207:4::29) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CY5PR10MB6071:EE_ X-MS-Office365-Filtering-Correlation-Id: 84a7ec14-b4b0-4ba6-21ac-08db3ff67557 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0rsl1D1lKzROAnp6mH3ZYnia/4ic1Z3aCeOGWCSeFJTyMV+cqBfQXn3czdXfnkop2CKjRehT5yEc572qK7iI/KTYz5ac8T1MTYW+VOwaqDMgvfItNWZ0wrsoT1x80BGs/RFvIEkxx2ttGDv4KTE1wjIsVi3S+vPDcq65jBTzRCikOjQDJUm+f8DIaO7Uv/kdt9KkPIQ38vKutM4ILc4aZDWlXAe/RgYX3Rg198qYTtVLasJ/4fDlduaY9n/ECVuD+wZx37uHbuveGImFi5xHwEt+6riQWh9um+ApRB2U7d6qI8h5lxU4DQloNrkBybIteUXVMQNhVHPQwYOfP9H9NsUckY0pVSzKxwII94Y1RrBe+o0kmK4XcuKHFOIz5XgrRsAMXJuF5qYOf73EXzxV+DkKAwg14as+18Ehy0udvLdrzNthOAYJ3qD2PlHWuNdphg2/FFd6vAIX0pwUaE+jOaBrkx3IQRhdew6n7DXryvA1tIO5Fa7zS3Tqo3AQIq3OZfjl9FGh/y7OMuTnLUbFkgtmzZMYIcHB3GuBr/CFPdgnmFQNp4A3hDTUi0PY53+JZYp5dsP3OpxIIPUkqubZrhuStWNZ2CdwHFTwHnk474OhJnwlfRPEQGkXltuvCuvox8iMWYfNQyc+9fHBHJow+Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199021)(2616005)(31686004)(38100700002)(6486002)(36916002)(6666004)(83380400001)(6512007)(6506007)(53546011)(186003)(26005)(478600001)(54906003)(110136005)(41300700001)(4326008)(66476007)(66946007)(66556008)(316002)(5660300002)(31696002)(86362001)(2906002)(36756003)(8676002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZEdTM3hMNWs4R2FCM0dXZENISDlRdm1SWmhMSWJBclBUaHFUaThIMWIxY0pH?= =?utf-8?B?WkNWeG5Rc1pLeDRhS2NCa1I2dElMU2dWcVh5S01PUmtrQWovbnQvSDV0dUZC?= =?utf-8?B?UDlMMnh3M1VNeW1Ba0tYRXh0eXo4MHdGdFRSM3g3TG5ORktwbElDQUR4SUZt?= =?utf-8?B?aHM3UzFQVGJlVjhKRWJwZnVFZUxQVUpOOGtOMDRpd3dOYlZBdFRqMjJrSjQ3?= =?utf-8?B?VVd4aFUrVTd3RExlNzcxQk4wTGRnbm5obUhRYVRMR1BRa25BQVpDc3VlUHVz?= =?utf-8?B?eVZpaDZ2bjNEb2IxMDN5V2EwTmZxNFFwd0IyS1Z0WGFaMTRody80WS9OdHo0?= =?utf-8?B?RXpJRDZx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XJ4LzJ4?= =?utf-8?B?c2E0M0tSRkJOc3pWVFR6RHFYUEpjVnYrZjI2Ly85VFg3QkRoV3NuVDVpc3F6?= =?utf-8?B?dEQyYm80TkhQYVlrS2hud3JmMjBoNFMwSXpWVDVQT1VuM3ZXdkRHQm43VE1Z?= =?utf-8?B?WXIxQmd0MCtHb0JQOHFNNHFWZlNCaUZjVGdnRlJoN2k1TDNZNVdTTzd5V0la?= =?utf-8?B?SDgzVEcrR1dqckJ3d29uV3NtZWtKQjdXMTJjZEFYbWdzdHN5ei8yUjE2VlFE?= =?utf-8?B?a05zSkhqK0ZFSlc2MEZXb1hpNHNjRDJSRHRXVnNtRDlwUGxtTHdxNzdKQzNI?= =?utf-8?B?bmNMeUtnbmIrOVBjSVY3aHZoSTE1QXkvV2lkbWJ6WEcyTCsvdlNGS1ZuYS94?= =?utf-8?B?WlRrUGNGUlI3NFd0M29nOUt1akgwdnRMUE5yaWZkY0FiNmhOWnI1bmJGcmI5?= =?utf-8?B?ZkJaRmVJWG82OGVETTFpSklYcVhPc09kck9VMTZWVmMyMjFEdz09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84a7ec14-b4b0-4ba6-21ac-08db3ff67557 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 10:19:56.8325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x73VDPhxWphDLYStvd0W4I2XwgzupsuNtoBr556zBLrmQrOcqvCLh4MfGgoSMjCLHNLWiZtrHDD0NiRVtgTKDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6071 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-18_06,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 bulkscore=0 mlxscore=0 mlxlogscore=982 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304180089 X-Proofpoint-GUID: lwJ3xBwUsPHU8vslc3PiXLgSJ0yVLS9R X-Proofpoint-ORIG-GUID: lwJ3xBwUsPHU8vslc3PiXLgSJ0yVLS9R X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 18/04/2023 10:23, Vasant Hegde wrote: > [ 172.017120] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.022955] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.028720] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.031815] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.031816] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.038727] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.038726] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.038917] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.038968] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.038970] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.039007] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.039091] nvme 0000:41:00.0: Using 64-bit DMA addresses > [ 172.039102] nvme 0000:41:00.0: Using 64-bit DMA addresses > > Otherwise patch worked fine for us. Hi Vasant, JFYI, Since you are using NVMe, you could also alternatively try something like which I did for some SCSI storage controller drivers to limit the request_queue max_sectors soft limit, like: diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c2730b116dc6..0a99c9a629c9 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1814,6 +1814,8 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl, max_segments = min_not_zero(max_segments, ctrl->max_segments); blk_queue_max_hw_sectors(q, ctrl->max_hw_sectors); q->limits.max_sectors = min(q->limits.max_hw_sectors, + (unsigned int)dma_opt_mapping_size(ctrl->dev)); blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX)); } blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1); lines 1-25/25 (END) dma_opt_mapping_size() will return the max IOVA caching size for iommu dma ops, so this would mean that we avoid alloc'ing and free'ing IOVAs at such a high rate (which I assume was your problem). Thanks, John