Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp344155pxh; Tue, 9 Nov 2021 11:37:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwwRkUJyOzgiv3XtHG5pQ/8RgJnahOqdiHqkphe6DBiOP7r27x3gEQ73kXtzSo5plf95IE X-Received: by 2002:a6b:b5c2:: with SMTP id e185mr6937699iof.127.1636486677664; Tue, 09 Nov 2021 11:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636486677; cv=none; d=google.com; s=arc-20160816; b=KM0d4PT+1c/iSZEPigecGuMPieARVlnqlLOftORW9eFEaG8J7i0I9xJcwrvK8is9ZF dsbIDbJcpwsXeSevOV0fQkRYp43XcA653B5XXMhmr0JAUsHVENhFkfXZMJXfNSOFZ5Vg 4HUyrcmpVRnQ0Lkvy+weuEtVCCKLSE85LmsIh1vH2gVnWhokvYg+AQENRQDjCQy089fB 1VNaIJCDXFaDjfiJLAjEfghz5XPB6CQLknNwO61ECnw1ZPB+JsRII3+2JV5DRcgwOsb4 yGbBc171V/uwL7M2KgM5F1fTui6DleRTn0bot+nhg9LvKO3LbEIRUCOK0WNIy54H59jh N44g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=crHFasFat+fcOHN+40IXFhDKY1nkjgwBvUy+yBnU2Jw=; b=mRL/X5iDHlLT2XzACyqu++E7uJ9DaCA+4h9S1ux9WHvgYBj90gUp61gPpNbr+114fJ kXPQAYDcXpziRqMhcpKGRJyNx7/CThR7ggFNDRP6nVzDJCw0+L8U5xGIHF/5cwaiM+i6 tpGp4lrj0eotY14SrPsZs8ZTM9s2f2uuVUemO9Vn3mKq5hIwJKoiiPJz/bTjCe4lAKAQ AEF+qEcwNOSXGU2RTu+YBf+KbKJi/+BWlQz4GOTPGucl9Z9X+9yAwSfM6OM/zg+7Co8X C9tsPkrJORhq0IyeuKv3qBxenUTYqQlR0HJeQAbgi/1dQOGg8l8LaJV2+UvuuMptTLlZ ioIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t20si46488600iov.32.2021.11.09.11.37.43; Tue, 09 Nov 2021 11:37:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242002AbhKILBe (ORCPT + 99 others); Tue, 9 Nov 2021 06:01:34 -0500 Received: from verein.lst.de ([213.95.11.211]:49658 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241381AbhKILBd (ORCPT ); Tue, 9 Nov 2021 06:01:33 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 6B81E67373; Tue, 9 Nov 2021 11:58:40 +0100 (CET) Date: Tue, 9 Nov 2021 11:58:40 +0100 From: "hch@lst.de" To: "Wang, Zhi A" Cc: "hch@lst.de" , Jani Nikula , Zhi Wang , "joonas.lahtinen@linux.intel.com" , "Vivi, Rodrigo" , "zhenyuw@linux.intel.com" , "jgg@nvidia.com" , "intel-gfx@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c Message-ID: <20211109105840.GA9675@lst.de> References: <20211108212718.10576-1-zhi.a.wang@intel.com> <875yt17qzs.fsf@intel.com> <5dd106e7-e62f-dfcd-bfa1-3f92794b8e3e@intel.com> <87o86t636f.fsf@intel.com> <20211109103622.GA7607@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 09, 2021 at 10:51:27AM +0000, Wang, Zhi A wrote: > Can you elaborate more about this? We need the hash query from the table > ASAP when the hypervisor trapped a mmio access. It's a critical path and > we tried different data structure in the kernel and the hash table gives > the best performance. Ok, I misunderstood the hashtable.h interface. hash_for_each_possible actually does a hash lookup instead of an interation despite the rather misleading name.