linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Antonov <alexander.antonov@linux.intel.com>
To: "Meyer, Kyle" <kyle.meyer@hpe.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "alexander.shishkin@linux.intel.com" 
	<alexander.shishkin@linux.intel.com>,
	"kan.liang@linux.intel.com" <kan.liang@linux.intel.com>,
	"alexey.budankov@linux.intel.com"
	<alexey.budankov@linux.intel.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"acme@kernel.org" <acme@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"Anderson, Russ" <russ.anderson@hpe.com>
Subject: Re: [PATCH] perf/x86/intel/uncore: Fix for iio mapping on Skylake Server
Date: Tue, 13 Oct 2020 17:37:59 +0300	[thread overview]
Message-ID: <da9bc69d-07b3-8817-bb7a-22a927b826e7@linux.intel.com> (raw)
In-Reply-To: <DF4PR8401MB1035CE7DBCCD58B531748BC69B080@DF4PR8401MB1035.NAMPRD84.PROD.OUTLOOK.COM>

Hello Kyle,

Currently we do not have plans on supporting the Uncore units to IIO PMON
mapping on multiple segment platforms due to a variety of such platforms.
It would be great if you describe your case, I mean how you configure 
segments
on your platform. It will help to cover your configuration and determine a
common approach for the mapping algorithm.

Thanks,
Alexander

On 10/09/2020 05:11 PM, Meyer, Kyle wrote:
> Hello Alexander,
>
> Do you plan on supporting multiple segment platforms?
>
> Thanks,
> Kyle Meyer
>
> ________________________________________
> From: alexander.antonov@linux.intel.com <alexander.antonov@linux.intel.com>
> Sent: Monday, September 28, 2020 5:21 AM
> To: peterz@infradead.org; linux-kernel@vger.kernel.org; x86@kernel.org
> Cc: alexander.shishkin@linux.intel.com; kan.liang@linux.intel.com; alexey.budankov@linux.intel.com; ak@linux.intel.com; acme@kernel.org; mingo@redhat.com; alexander.antonov@linux.intel.com; Meyer, Kyle; Anderson, Russ
> Subject: [PATCH] perf/x86/intel/uncore: Fix for iio mapping on Skylake Server
>
> From: Alexander Antonov <alexander.antonov@linux.intel.com>
>
> Introduced early attributes /sys/devices/uncore_iio_<pmu_idx>/die* are
> initialized by skx_iio_set_mapping(), however, for example, for multiple
> segment platforms skx_iio_get_topology() returns -EPERM before a list of
> attributes in skx_iio_mapping_group will have been initialized.
> As a result the list is being NULL. Thus the warning
> "sysfs: (bin_)attrs not set by subsystem for group: uncore_iio_*/" appears
> and uncore_iio pmus are not available in sysfs. Clear IIO attr_update
> to properly handle the cases when topology information cannot be
> retrieved.
>
> Fixes: bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping")
> Reported-by: Kyle Meyer <kyle.meyer@hpe.com>
> Suggested-by: Kan Liang <kan.liang@linux.intel.com>
> Reviewed-by: Alexei Budankov <alexey.budankov@linux.intel.com>
> Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
> Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com>
> ---
>   arch/x86/events/intel/uncore_snbep.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> index 62e88ad919ff..ccfa1d6b6aa0 100644
> --- a/arch/x86/events/intel/uncore_snbep.c
> +++ b/arch/x86/events/intel/uncore_snbep.c
> @@ -3749,7 +3749,9 @@ static int skx_iio_set_mapping(struct intel_uncore_type *type)
>
>          ret = skx_iio_get_topology(type);
>          if (ret)
> -               return ret;
> +               goto clear_attr_update;
> +
> +       ret = -ENOMEM;
>
>          /* One more for NULL. */
>          attrs = kcalloc((uncore_max_dies() + 1), sizeof(*attrs), GFP_KERNEL);
> @@ -3781,8 +3783,9 @@ static int skx_iio_set_mapping(struct intel_uncore_type *type)
>          kfree(eas);
>          kfree(attrs);
>          kfree(type->topology);
> +clear_attr_update:
>          type->attr_update = NULL;
> -       return -ENOMEM;
> +       return ret;
>   }
>
>   static void skx_iio_cleanup_mapping(struct intel_uncore_type *type)
>
> base-commit: a1b8638ba1320e6684aa98233c15255eb803fac7
> --
> 2.19.1
>


  reply	other threads:[~2020-10-13 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 10:21 [PATCH] perf/x86/intel/uncore: Fix for iio mapping on Skylake Server alexander.antonov
2020-09-30 18:58 ` [tip: perf/core] " tip-bot2 for Alexander Antonov
2020-10-09 14:11 ` [PATCH] " Meyer, Kyle
2020-10-13 14:37   ` Alexander Antonov [this message]
2020-11-03 21:47     ` Meyer, Kyle

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=da9bc69d-07b3-8817-bb7a-22a927b826e7@linux.intel.com \
    --to=alexander.antonov@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kyle.meyer@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=russ.anderson@hpe.com \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).