Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp152062pxy; Tue, 20 Apr 2021 23:02:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2FUqRXFkspNCCgcFT+QkQl+ifE0DiAxGF2pPslwRIA8OGJGbYpLmq9jsiUZza6WGsyWKO X-Received: by 2002:a17:906:f8d7:: with SMTP id lh23mr31087644ejb.77.1618984970554; Tue, 20 Apr 2021 23:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618984970; cv=none; d=google.com; s=arc-20160816; b=o8U4n0UomiAgUG0wftNc5/6fcUQuTinPlC1tmN4UMX1mkM9lrQ3nBCxWS3m8V/6o8I L/dQ7Xo+FF77No1o9RtUocLE64cEOIbQBzLD42tlwPZam5VyqAJTcqzveEmFslxa2SMJ nmnOX8KHkmOyaJK3kvzbx8Z4VmTTM3JxTv9FTZNTH6O+7ytF3rN4hIWYOrJZaJqdMWE9 ETGHuCf0ybay++aInFKzSTUOQA8Q7dqDq7Q8cL04yXRaLyqRG+kJ8PAx15KT5UQiIOka WGsFBM5S36i9JryP5UtC/s0/rgzTQ4s6Z1+hTUTMOUYsypXd+5w96GB6qnPz36iDM+rZ jKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n/aNImCbexmQGxGhnQSNx2tRSwZA9bdJWzH04vxtics=; b=ADNZQnuBD91RT2y71grNozINlL9YylGYblnUMbyHFByF9kAXIxEyKGPECejs8R2H+V 4/+3P1VAMSjiBsKHh9KAR4aSsChl2hM7iQUlNF0r9RTgdS3lxO5DeIMZGMLmKEAvGCsd Lx6l2yUUU+PQ5nA1WjL/zylyVDqeO6JB49SN7V+eGSy9KBb3inqw+gwFxJ/I+VSBmh3s SmmCdu0Mh2CFu991BEIPZkw7hKBBAg/u9fLfk9u246qcRpUhEWLU3/L8m6Ai91N7KZkK 6ErVGRKlgLBiQ2gr+JbmyZ1qzTaN1EmArCgR3T5CzF4M0bv5nHdGeAL0LfRDmFgljYta DVtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pbrOLZIw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si1110447edc.63.2021.04.20.23.02.26; Tue, 20 Apr 2021 23:02:50 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pbrOLZIw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235319AbhDUGBx (ORCPT + 99 others); Wed, 21 Apr 2021 02:01:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:40010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbhDUGBw (ORCPT ); Wed, 21 Apr 2021 02:01:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5E916100A; Wed, 21 Apr 2021 06:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618984879; bh=6FjsOQSh7Hi/oGJ9pXqxW8e7eha1gtbPY7bBsDkVCYE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pbrOLZIwBEowdvqZNySt54+d/jA6eBoYMoWezzqYMJQeB7gUeGy98SzJjQxHHiOKy 8A1BNVxll3Al3+/QHMnNhRTl6u2OVTbgsPHbfdkxR/K2MG+5kYvK2e0bERtpqApe+2 u9YNrwBaz64LyWyh0pMI5sdA8Yyqgz9JEMvolKRVv44fCngtdjmuIRR8vTCPCggE+6 GxUkYfd3BFEBj/6I8Ti/oz7jlZLCfz00LqwwF8NZWYuVp1I777QtnT+5BsYcLuXcni W2Cba//Tn0BgfzdOA3kxdSEvGEAEJL3MNGw867p9e44mGNrIDqPrFgK1tA9iDlTN/+ x1iDRilqReDvA== Date: Wed, 21 Apr 2021 11:31:15 +0530 From: Vinod Koul To: "Zanussi, Tom" Cc: peterz@infradead.org, acme@kernel.org, mingo@kernel.org, kan.liang@linux.intel.com, dave.jiang@intel.com, tony.luck@intel.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v2 1/1] dmaengine: idxd: Add IDXD performance monitor support Message-ID: References: <34f61cc9-a6d6-e5a3-5f8c-6ffae8858cce@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34f61cc9-a6d6-e5a3-5f8c-6ffae8858cce@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20-04-21, 09:13, Zanussi, Tom wrote: > Hi Vinod, > > On 4/20/2021 6:11 AM, Vinod Koul wrote: > > On 03-04-21, 11:45, Tom Zanussi wrote: > > > > > +config INTEL_IDXD_PERFMON > > > + bool "Intel Data Accelerators performance monitor support" > > > + depends on INTEL_IDXD > > > + default y > > > > default y..? > > Will change to n. That is the default, you may drop this line > > > > > > /* IDXD software descriptor */ > > > @@ -369,4 +399,19 @@ int idxd_cdev_get_major(struct idxd_device *idxd); > > > int idxd_wq_add_cdev(struct idxd_wq *wq); > > > void idxd_wq_del_cdev(struct idxd_wq *wq); > > > +/* perfmon */ > > > +#ifdef CONFIG_INTEL_IDXD_PERFMON > > > > maybe use IS_ENABLED() ? > > > > > @@ -556,6 +562,8 @@ static int __init idxd_init_module(void) > > > for (i = 0; i < IDXD_TYPE_MAX; i++) > > > idr_init(&idxd_idrs[i]); > > > + perfmon_init(); > > > + > > > err = idxd_register_bus_type(); > > > if (err < 0) > > > return err; > > > @@ -589,5 +597,6 @@ static void __exit idxd_exit_module(void) > > > pci_unregister_driver(&idxd_pci_driver); > > > idxd_cdev_remove(); > > > idxd_unregister_bus_type(); > > > + perfmon_exit(); > > > > Ideally would make sense to add perfmon module first and then add use in > > idxd.. > > > > OK, I'll separate this out into a separate patch. > > > > +static ssize_t cpumask_show(struct device *dev, struct device_attribute *attr, > > > + char *buf); > > > + > > > +static cpumask_t perfmon_dsa_cpu_mask; > > > +static bool cpuhp_set_up; > > > +static enum cpuhp_state cpuhp_slot; > > > + > > > +static DEVICE_ATTR_RO(cpumask); > > > > Pls document these new attributes added ? > > > > > +static int perfmon_collect_events(struct idxd_pmu *idxd_pmu, > > > + struct perf_event *leader, > > > + bool dogrp) > > > > dogrp..? > > > > Yeah, bad name, first thought on seeing it is always 'dog'. ;-) Yep, that was my first read as well... i guess it would be better as do_grp -- ~Vinod