[PATCH 5/6] drm/i915/gvt: Add helper for tuning MMIO hash table
Zhenyu Wang
zhenyuw at linux.intel.com
Mon Jun 5 04:43:51 UTC 2017
On 2017.06.02 14:03:50 +0800, changbin.du at intel.com wrote:
> From: Changbin Du <changbin.du at intel.com>
>
> We count all the tracked virtual MMIO registers, which can help us to
> tune the MMIO hash table.
>
> Signed-off-by: Changbin Du <changbin.du at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/handlers.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
> index bc68752..8f1a727 100644
> --- a/drivers/gpu/drm/i915/gvt/handlers.c
> +++ b/drivers/gpu/drm/i915/gvt/handlers.c
> @@ -47,6 +47,8 @@
> #define PCH_PP_OFF_DELAYS _MMIO(0xc720c)
> #define PCH_PP_DIVISOR _MMIO(0xc7210)
>
> +static unsigned int num_tracked_mmio;
> +
> unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt)
> {
> if (IS_BROADWELL(gvt->dev_priv))
> @@ -124,6 +126,7 @@ static int new_mmio_info(struct intel_gvt *gvt,
> gvt->mmio.mmio_attribute[info->offset / 4] = flags;
> INIT_HLIST_NODE(&info->node);
> hash_add(gvt->mmio.mmio_info_table, &info->node, info->offset);
> + num_tracked_mmio++;
> }
> return 0;
> }
> @@ -2917,6 +2920,8 @@ int intel_gvt_setup_mmio_info(struct intel_gvt *gvt)
> if (ret)
> goto err;
> }
> +
> + gvt_dbg_mmio("traced %u virtual mmio registers\n", num_tracked_mmio);
> return 0;
> err:
> intel_gvt_clean_mmio_info(gvt);
might better to put in intel_gvt, whenever we'd do debugfs thing can
be retrieved from there.
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170605/fd226c2b/attachment-0001.sig>
More information about the intel-gvt-dev
mailing list