All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Zhi A" <zhi.a.wang@intel.com>
To: "hch@lst.de" <hch@lst.de>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Zhi Wang <zhi.wang.linux@gmail.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"intel-gvt-dev@lists.freedesktop.org"
	<intel-gvt-dev@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c
Date: Tue, 9 Nov 2021 11:02:28 +0000	[thread overview]
Message-ID: <040f15a2-e538-8762-1a85-82df0c4190cc@intel.com> (raw)
In-Reply-To: <20211109105840.GA9675@lst.de>

On 11/9/2021 12:58 PM, hch@lst.de wrote:
> 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.

Yes. Maybe with a keyword "lookup" in the name of the interface would be 
better since it's widely used in the kernel. :)


WARNING: multiple messages have this Message-ID (diff)
From: "Wang, Zhi A" <zhi.a.wang@intel.com>
To: "hch@lst.de" <hch@lst.de>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Zhi Wang <zhi.wang.linux@gmail.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"intel-gvt-dev@lists.freedesktop.org"
	<intel-gvt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c
Date: Tue, 9 Nov 2021 11:02:28 +0000	[thread overview]
Message-ID: <040f15a2-e538-8762-1a85-82df0c4190cc@intel.com> (raw)
In-Reply-To: <20211109105840.GA9675@lst.de>

On 11/9/2021 12:58 PM, hch@lst.de wrote:
> 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.

Yes. Maybe with a keyword "lookup" in the name of the interface would be 
better since it's widely used in the kernel. :)


WARNING: multiple messages have this Message-ID (diff)
From: "Wang, Zhi A" <zhi.a.wang@intel.com>
To: "hch@lst.de" <hch@lst.de>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Zhi Wang <zhi.wang.linux@gmail.com>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-gvt-dev@lists.freedesktop.org" 
	<intel-gvt-dev@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c
Date: Tue, 9 Nov 2021 11:02:28 +0000	[thread overview]
Message-ID: <040f15a2-e538-8762-1a85-82df0c4190cc@intel.com> (raw)
In-Reply-To: <20211109105840.GA9675@lst.de>

On 11/9/2021 12:58 PM, hch@lst.de wrote:
> 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.

Yes. Maybe with a keyword "lookup" in the name of the interface would be 
better since it's widely used in the kernel. :)


  reply	other threads:[~2021-11-09 11:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 21:27 [Intel-gfx] [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c Zhi Wang
2021-11-08 21:27 ` Zhi Wang
2021-11-08 21:27 ` [Intel-gfx] [PATCH 2/3] i915/gvt: save the initial HW state snapshot in i915 Zhi Wang
2021-11-08 21:27   ` Zhi Wang
2021-11-08 21:27 ` [Intel-gfx] [PATCH 3/3] i915/gvt: Use the initial HW state snapshot saved " Zhi Wang
2021-11-08 21:27   ` Zhi Wang
2021-11-09  7:00 ` [Intel-gfx] [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c Jani Nikula
2021-11-09  7:00   ` Jani Nikula
2021-11-09  7:51   ` [Intel-gfx] " Christoph Hellwig
2021-11-09  7:51     ` Christoph Hellwig
2021-11-09  8:41   ` [Intel-gfx] " Wang, Zhi A
2021-11-09  8:41     ` Wang, Zhi A
2021-11-09 10:20     ` [Intel-gfx] " Jani Nikula
2021-11-09 10:20       ` Jani Nikula
2021-11-09 10:36       ` [Intel-gfx] " hch
2021-11-09 10:36         ` hch
2021-11-09 10:51         ` [Intel-gfx] " Wang, Zhi A
2021-11-09 10:51           ` Wang, Zhi A
2021-11-09 10:51           ` Wang, Zhi A
2021-11-09 10:58           ` [Intel-gfx] " hch
2021-11-09 10:58             ` hch
2021-11-09 11:02             ` Wang, Zhi A [this message]
2021-11-09 11:02               ` Wang, Zhi A
2021-11-09 11:02               ` Wang, Zhi A
2021-11-09 10:53       ` [Intel-gfx] " Wang, Zhi A
2021-11-09 10:53         ` Wang, Zhi A
2021-11-09  9:44   ` [Intel-gfx] " Christoph Hellwig
2021-11-09  9:44     ` Christoph Hellwig
2021-11-09 14:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/3] " Patchwork
2021-11-11 23:32 ` [Intel-gfx] [PATCH 1/3] " kernel test robot
2021-11-11 23:32   ` kernel test robot
2021-11-11 23:32   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=040f15a2-e538-8762-1a85-82df0c4190cc@intel.com \
    --to=zhi.a.wang@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jgg@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhi.wang.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.