Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp173785rwo; Tue, 1 Aug 2023 15:04:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWGzDY2iOsRMJzFxhNGSUbDo+I62U4NrnkV05tJT8f7NvTCg+zla8XnP879CGp1Yhq8BVJ X-Received: by 2002:a05:6a20:3d8f:b0:12d:5b6:7b32 with SMTP id s15-20020a056a203d8f00b0012d05b67b32mr14272185pzi.3.1690927457415; Tue, 01 Aug 2023 15:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690927457; cv=none; d=google.com; s=arc-20160816; b=ZlObHie00v0hH8IOIBH3Nrh/yrvCIU6Gjm+uBJjsZC0XyRxsnIrRemJT09bqZMqYZf tiN54gPqKtKe8KBFqUDLYDjoHIZFmmIy8rqGMLlEqUB3tO05AwnMNvBv5gqhbT1GJUFb gs7Kbx2BMiAuD9THMsw/5whEOAvuJb+NFh3LRXlw6gTBzMVrBHuxUogfNI7l7Nlbx69k 08Iqi4WNZ2V/x9wNhbI8+rq9LCWkJ/uxngi4mLDp+4w/TM4jPYRNqGkYuQuAMrm0YbZp RX965D5n8b2GZAIQPGBBdLfwjQpA9E4B9UhjcBlTnYiIBEUDlAXL80XkVCmGqx4QT+c3 OMyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qQHhC8V6ySk1bsLv2Aisbdsq7KVVoGJblGjh6qgWX2U=; fh=MTUO8ESUQnC1SPiVPHox7u+1+mUiO2yWfrD1lSLtrCs=; b=z9BJuTlYzpabRKsM+k1TM5H0hENP8JQe4qlJS59fMXZUkF4meOy5/iO8UX68QKfo0w FbTEUp8hAYWH7jBVY44FuwsOAL/jQGlrNI66FFgLB2IkeGAma4/n3W9IxtpTACdYWYxS GMcxOv06WeQl3sn+e9CQiUWx7+GVMFgtBYIjrDCOIwpCDXHIqTw8v8bF/HP9xRt/ruk1 uSDFY6JyUtmcrXfCAF81uuzUwpvdHOE4ejzq/whpM/rMgVW9qnuiaOSGgD35PUBsiPGI ahfyklox3vUQPfv/KFAZScn87HGauvqKlznXvUIZ9+tMGCT2b+q1abjvb7Da1NfHGFe4 9TyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeH44eSs; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v62-20020a638941000000b0055baed7e7e6si2002255pgd.251.2023.08.01.15.04.04; Tue, 01 Aug 2023 15:04:17 -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=@kernel.org header.s=k20201202 header.b=WeH44eSs; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232676AbjHAUmO (ORCPT + 99 others); Tue, 1 Aug 2023 16:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjHAUmL (ORCPT ); Tue, 1 Aug 2023 16:42:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C0A2106 for ; Tue, 1 Aug 2023 13:41:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7AA2E616FA for ; Tue, 1 Aug 2023 20:41:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34A64C433C9; Tue, 1 Aug 2023 20:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690922514; bh=UmykxjBF+sC4aN4OQ8EfvIYebgfE0K7LxRs85fn43fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeH44eSsG9xcFFrj+wih+yefO4Nd1y2oXU/izkvZNGEVLYMWas4UYdN/krVJ8IDvk 2oRZC/YX+ezOMpzKcC5UWEA7B6X5lcsA9lBf8n3NPEfAHNEQo9Ume5RAXLLySBhEGN avE9yqBmEpeYKzGzoFqIZ3Dco0dtnqVtKk8ud5pxmmyDzHk32Tfyz3hUZ5AwIKovqU xND8qoW6cRRFcDU2/d4yXsKlcJhtRu+MSHyAFl54PIYfO/pCVpFmb29eEUo8QgwIZS jR8VkCgdvvCbY2R/xNAJkDUm6+BNfajHsdploQkOYiC8Slm+HffWvtIPRwvbpbXpr/ ALP1Xuhl83fMA== From: Will Deacon To: Dawei Li , joro@8bytes.org, robin.murphy@arm.com Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/arm-smmu-v3: Change vmid alloc strategy from bitmap to ida Date: Tue, 1 Aug 2023 21:41:47 +0100 Message-Id: <169087904450.1290857.11726985177314533259.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Sun, 16 Jul 2023 00:16:21 +0800, Dawei Li wrote: > For current implementation of vmid allocation of arm smmu-v3, a per-smmu > devide bitmap of 64K bits(8K bytes) is allocated on behalf of possible VMID > range, which is two pages for some architectures. Besides that, its memory > consumption is 'static', despite of how many VMIDs are allocated actually. > > That's memory inefficient and lack of scalability. > > [...] Applied to will (for-joerg/arm-smmu/updates), thanks! [1/1] iommu/arm-smmu-v3: Change vmid alloc strategy from bitmap to ida https://git.kernel.org/will/c/1672730cffaf Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev