Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1013670rwd; Thu, 15 Jun 2023 05:22:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pRuap14Y0aPM2rejWN8SdpXCaJcYdYzmxvBOfRKrhaAv78yRf+1Y0ZoEDBK2PhOygqZKD X-Received: by 2002:a17:902:d510:b0:1b5:cd6:8246 with SMTP id b16-20020a170902d51000b001b50cd68246mr4652672plg.2.1686831764642; Thu, 15 Jun 2023 05:22:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686831764; cv=pass; d=google.com; s=arc-20160816; b=mvp5tT8+zPBSPGkJ3sundKCCaKQDt4SkYApnZf8FhypBnRah1dHIoInZSvpYPW/e/g WJ6wv8zj3oXSyla+OeCHOOkFAqEd4xUm68e0l09SLcZ3bZ7i+HDadOMbZDHeOUtGr4Jb 8EV51Je0Sf3HThcaFsUWzIQuL/9OllAg9Nn/0pqgIX86rDp0spiEhtPvUk2Pra+6/NCV /9Xv5y1MgxAoT/tVQ5oq0nymijq3HpGdTQLukSF0c1JcdNpVZWk0RtE2olkRP/8K29xL vKIZwhVQuz85j4vh/d8mYO6WA49F01LcK6Xo8irB79D2O4RzTS4JHdkSMC4yvz+vG1oH 2aBw== 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=vTrbw4wAVBBn6crFAJhhSuUAd4DLo/sVjr6S9clYs1s=; b=hWQ+bPZOuDR3zS6B92ySb46206HLhO4cULOscm8wkFVDc6gVr+xS5m6cY+L1t+ctNJ jxp6Ioe9IUEtPUnN0akfr7t18OPU5FzNLr6QTkGqXpGmAJPPOXIxrVuDCQFVhxOxdIE4 Js//NGTmkrvTOMnAxuhtu2bThvnYFAPp993hPO5q3uIz8phH6ieC9fqUiamBhgswS8xX FG4S8J51Vkz8BbV8Z/FNWrDBF3GFqo8nzhfTMKah8r8NYNu+KExVmL50F62P1ibKhR3+ ubuwPMCaAap2rX3LHZc/dopjMNWZS4wpBaDLnuGzlsyJGQ1ZYtYLoiPdA18plt75jfpF 0eug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=OGPlhW+o; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TNGAnn4J; 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 l13-20020a170902f68d00b001ae5e5c275asi48966plg.364.2023.06.15.05.22.31; Thu, 15 Jun 2023 05:22:44 -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=OGPlhW+o; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TNGAnn4J; 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 S231382AbjFOMSu (ORCPT + 99 others); Thu, 15 Jun 2023 08:18:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239286AbjFOMSe (ORCPT ); Thu, 15 Jun 2023 08:18:34 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE622962 for ; Thu, 15 Jun 2023 05:16:44 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35FBETOm028784; Thu, 15 Jun 2023 12:15:16 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=vTrbw4wAVBBn6crFAJhhSuUAd4DLo/sVjr6S9clYs1s=; b=OGPlhW+o0Zc44MBzYbVQBLjXFIPCen+ofrvT+K59UXJwQy964HRxjhHKpSxYRGScyPOm BTvP7BuKDlyEo37Z96hqd9rJzo0oj+maI4RshwRZ5llSVM9w36HCAfwuKZyYoZBh5f7U WtunDT/YnZwSQJOdDKtSJe1LZP3bDxIXg5+Bz/FYEqk1bqsKTl9XjCG0cdSuOqk1rTpe gkYG+EwW9v7rjT6LER46Hv0Q2SpO2h3ciD1mH6OAkkHMJ/IUyMZ0z1tHH4MmgPPu7u3i QAQQKrKfkQzhN1cRcGzlUBYMDiRPJTNu1PEtlXKMi6c5N2BmXcKndQQt7ZjN9QFthB+w 4w== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r4h2asssj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Jun 2023 12:15:16 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35FBXrxE011441; Thu, 15 Jun 2023 12:15:14 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r4fm6vfgj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Jun 2023 12:15:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SiytQVLMPh+kIgCwJnBOG5diMLJQsNZyEg09bAUJQwyhqcBYkHOqfpYI1lKaosKqN6dwerdjncekuctSShTM5kIkkB1WHNUSK+AkNM9+hS/Z0imZKLuX2cdWsSXxmrqe0qkiUQvl2RqXZ6mIa7v1me3pcDBWGCaQu6VUyPvTXE2/yNseZtTSfBG94ukuLN4M7bPCbPtFS329+MTOTLhcGNWkPp1SxwxBjvzPhGI4GJ5YmQLVjIcHjFo1GL3Rs9AaMqMe7LTqcWyhbNy9EMDrSIXJCEyvLtzJygR26u7rWOO3zEVhHg4iskRChj7MFncBxjWfSE7tEQmT8UskhHjAXg== 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=vTrbw4wAVBBn6crFAJhhSuUAd4DLo/sVjr6S9clYs1s=; b=hB1KAYjcAoqxQ1u7NrQEqubUrj4uEd0o8pfFM2ZBZpcxGJ2cZHR4Y2tTDEHusexyBfUlOUNw03IKDtNbL0PTvAJxwxLxK16t5xS3wBMYv+788T562arvZl/50N4VTWNw2ByCT3nQKETdbUM3r+LjzJzIyAj/4rokL3o/+YUfUjf7m99mMO8Aja5k61gBh86DJ5df2uxExqjru609MiGeVua7Q/8ISRX0dfTfL+jY3L7DOkiaABuYApS90QgXB1hgfgKV4iJ8Lcz92IwmnTL0+xlakgXOYOSwfmf+iURpvwcRtTXFWuZTppqbxQlmoZ0JDuHuBJrm5OVL0H+Wc5WsbQ== 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=vTrbw4wAVBBn6crFAJhhSuUAd4DLo/sVjr6S9clYs1s=; b=TNGAnn4JFNpCeqHVuRc130b7W0CnrUpsfCjtAjAOXR3vjth+v8cz0P7cf9iWm5obnBfqnoF3xWc9VJFUqhbiCizOriqEjd4bLe5+CMmTI6kYxwRrR1SKTYlHds036jK9XI8cGGXg3qojuVbircy+emulIvlAATKQPkaW7jQcGj8= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by MW4PR10MB6440.namprd10.prod.outlook.com (2603:10b6:303:218::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.46; Thu, 15 Jun 2023 12:15:12 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::e38:5b81:b87f:c1eb]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::e38:5b81:b87f:c1eb%7]) with mapi id 15.20.6500.026; Thu, 15 Jun 2023 12:15:12 +0000 Message-ID: Date: Thu, 15 Jun 2023 13:15:07 +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: Robin Murphy , Jakub Kicinski , Joerg Roedel Cc: will@kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Linus Torvalds References: <20230613105850.30172085@kernel.org> <4f9184c5-e6a2-08da-f44a-3000b6cdfe35@oracle.com> <198a73b0-d7c0-57d6-5ef9-4e9dddb6365b@arm.com> <568df53c-41a7-94d7-6662-f8f7c72e5178@oracle.com> <99c1e8ab-a064-c770-072f-23ef9e9abb82@arm.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: <99c1e8ab-a064-c770-072f-23ef9e9abb82@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0149.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::10) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|MW4PR10MB6440:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d04ed31-1826-4d4e-dc7b-08db6d9a2b07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LCkXFpLRUrHJC+t+pOOe88ZB813+mc81Ljw8o8Fm3mxy70nHKxOmcayJliPd90rHE2dGykDemdIVCc36f1HTXQiupzQFdxOHffGjbGNVVv/IcfoYyCZW3Nwu7+BtRUin4S8K+GkKhNlGugitmiGa1/07avTZejqRSeWMyB/nBDxKcoLry8m8gBGBSuK3SbX4RE8A8K/UTDw0A009ePqxgz6tMC6Eai4TrTBYnixkpTecnhUJZ+btAVFIK2Enq4xibG8be1dJ2A8pcd9Ri5SmMA1okTkcXlQYHCOrQhkpjmrJ0FKf5dZW0fsg+M/tkPtwZTbFF4A/w+P0XIUqZHcI/D4Ahx2OfG4wZVAU8BcIXM0Ez0OAyyvHzUg2ciGm/5MpgjRu/relY+t9gTLRA2Ff7PWhOfVWp59KrCYvwwdnqAKV/ta5VdP4MQ/ZSsV2rHm3/YaernPThEv2wJjXy9tx3Qao7juPkX1bRdLAMp5NLk9uxhT1vqnAHTjHY79u0uQ3gi/C3JM2kS/tytkZ3kyj7XIHsxpjlwWwQPrnLiugARs2xln+l+eCYup0Sh8kvc4LbW+7DbFptByaPo1Vg1mZI3iiBmVLN9HbIa/Eb9aqb08dy3GNr8AFr8GAgRevSGKBlAeXZAz5Po6PF/eTXdb6Zw== 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)(39860400002)(346002)(136003)(376002)(366004)(396003)(451199021)(6486002)(86362001)(31696002)(38100700002)(36756003)(478600001)(6666004)(110136005)(8936002)(966005)(36916002)(8676002)(5660300002)(66556008)(4326008)(66946007)(66476007)(41300700001)(316002)(2906002)(31686004)(2616005)(6512007)(6506007)(26005)(53546011)(186003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WlZzZVlYdnlVUTZBNVZDcmYxUTk2cjFMUEViZlNHMEJoNVdzTHZ3SW0xQXZC?= =?utf-8?B?TXdlcjNZamVCQTJmYURwdjFZZzlJWjlEa1RPV25PZ1NpbXl1ZzJnZkoySGRl?= =?utf-8?B?OHpjVzVDdk5wYkpLV3hUejN0V1d6alpPNFJ0UEpjK0VqeFFoRTBBM2l5Qmhr?= =?utf-8?B?N2k2VHIvV1QyZ3hKOVlWalVMS2szaVRFRFhYRWRMc1ZqVDM3Z0MrYWRCb0xZ?= =?utf-8?B?T0ZacFVrT1Eva3oycUxlRVBFTnpBdXlWeHdCeHVSd2NOeHh0bTRveEc5NVZ6?=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utf-8?B?ZVB1STJHb2o4QmkyOUJPRzY2dlR3S1kzWC90Z3I2NWRjTXBHeFJTWFBCa2ww?= =?utf-8?B?MDgwUDdHQkgydlBwWUQ2ZHZud05heEcyQ3JCVGptUkNKbmp4bkU4OEw3dCty?= =?utf-8?B?YXZDakVGNXBlL1VxSUk2QS9WNWsrS1doN3FVaGxQT3l1dVNQcWJHdDF0WG5q?= =?utf-8?B?UDhSeHVSUTluZ240TjVyWTFNZklVQThTUmM1VG1aTGhlVmc5WUVuQkVucTJM?= =?utf-8?B?QjFXVytzU0t4N2I2L0J5Yk5vSUlvYjdSYnFlR1pyZ0dNT3ZEYzJHYWxub1Zm?= =?utf-8?B?UHFJcmQwQlk1V0krWVBzRE1sYjZUQmpkd1RhTndJcnlsa3NxblVJM2MzNnFU?= =?utf-8?B?YlhRaGZtR3FWTG9ReGVjWDF2bmZIc2xXS3dsT3VvUzducldyYzF2SVR0YzRQ?= =?utf-8?B?NEZwUUlUbUJ5cTNIZksxQ29BMHlkVCs2bDNwVHJpSnJ1ZVZGQldXbG93RkJ6?= =?utf-8?B?c0c1aEFGVEV0L2tnNFYxVklKQ0ZaOXVrWmttZ1J2YmlRbkx2UUJXdUFlQVEv?= =?utf-8?Q?LFwSNMoajid1Bfi?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d04ed31-1826-4d4e-dc7b-08db6d9a2b07 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2023 12:15:11.9290 (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: QoI6/9ySs6ctd+WaJFE+IINZpGCoihaveoHODnWADVZhsKJwyGBfU0EMEAyjDXwaJPPdZAC1Q3UTHx4WH28l/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6440 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-15_08,2023-06-14_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=892 bulkscore=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306150107 X-Proofpoint-ORIG-GUID: rRAJWizuLCXN_dar15hdKKP0QsXPx103 X-Proofpoint-GUID: rRAJWizuLCXN_dar15hdKKP0QsXPx103 X-Spam-Status: No, score=-2.9 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_H5,RCVD_IN_MSPIKE_WL,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 15/06/2023 12:41, Robin Murphy wrote: >> >> Sure, not the same problem. >> >> However when we switched storage drivers to use dma_opt_mapping_size() >> then performance is similar to iommu.forcedac=1 - that's what I found, >> anyway. >> >> This tells me that that even though IOVA allocator performance is poor >> when the 32b space fills, it was those large IOVAs which don't fit in >> the rcache which were the major contributor to hogging the CPU in the >> allocator. > > The root cause is that every time the last usable 32-bit IOVA is > allocated, the *next* PCI caller to hit the rbtree for a SAC allocation > is burdened with walking the whole 32-bit subtree to determine that it's > full again and re-set max32_alloc_size. That's the overhead that > forcedac avoids. > Sure > In the storage case with larger buffers, dma_opt_mapping_size() also > means you spend less time in the rbtree, but because you're inherently > hitting it less often at all, since most allocations can now hopefully > be fulfilled by the caches. Sure > That's obviously moot when the mappings are > already small enough to be cached and the only reason for hitting the > rbtree is overflow/underflow in the depot because the working set is > sufficiently large and the allocation pattern sufficiently "bursty". After a bit of checking, this is same issue https://lore.kernel.org/linux-iommu/20230329181407.3eed7378@kernel.org/, and indeed we would always be using rcache'able-sized mappings. So you think that we are reaching the depot full issue when we start to free depot magazines in __iova_rcache_insert(), right? From my experience in storage testing, it takes a long time to get to this state. Thanks, John