From: Bjorn Helgaas <helgaas@kernel.org>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: chengyou@linux.alibaba.com, kaishen@linux.alibaba.com,
yangyicong@huawei.com, will@kernel.org,
Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com,
robin.murphy@arm.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
rdunlap@infradead.org, mark.rutland@arm.com,
zhuo.song@linux.alibaba.com, renyu.zj@linux.alibaba.com
Subject: Re: [PATCH v7 3/4] drivers/perf: add DesignWare PCIe PMU driver
Date: Mon, 16 Oct 2023 09:38:05 -0500 [thread overview]
Message-ID: <20231016143805.GA1207929@bhelgaas> (raw)
In-Reply-To: <4147832a-1f24-5993-dfb6-59f420a17481@linux.alibaba.com>
On Mon, Oct 16, 2023 at 11:00:13AM +0800, Shuai Xue wrote:
> On 2023/10/14 00:30, Bjorn Helgaas wrote:
> > On Fri, Oct 13, 2023 at 11:46:44AM +0800, Shuai Xue wrote:
> >> On 2023/10/13 00:25, Bjorn Helgaas wrote:
> >>> On Thu, Oct 12, 2023 at 11:28:55AM +0800, Shuai Xue wrote:
> >>>> This commit adds the PCIe Performance Monitoring Unit (PMU)
> >>>> driver support for T-Head Yitian SoC chip. Yitian is based on
> >>>> the Synopsys PCI Express Core controller IP which provides
> >>>> statistics feature. The PMU is not a PCIe Root Complex
> >>>> integrated End Point(RCiEP) device but only register counters
> >>>> provided by each PCIe Root Port.
> @@ -447,10 +447,10 @@ static int dwc_pcie_pmu_event_add(struct perf_event *event, int flags)
> u32 ctrl;
>
> /* Only one counter and it is in use */
> - if (pcie_pmu->event)
> + if (pcie_pmu->event[type])
> return -ENOSPC;
>
> - pcie_pmu->event = event;
> + pcie_pmu->event[type] = event;
OK, makes good sense (probably update the comment also, e.g., "one
counter of each type").
> }
> > If so, I might word this as:
> >
> > Each Root Port contains one counter that can be used for either:
> >
> > - Time-Based Analysis (RX/TX data throughput and time spent in
> > each low-power LTSSM state) or
> >
> > - Event counting (error and non-error events for a specified lane)
> >
> > There is no interrupt for counter overflow.
>
> Based on above, I change the word to:
>
> To facilitate collection of statistics the controller provides the
> following two features for each Root Port:
>
> - one 64-bit counter for Time Based Analysis (RX/TX data throughput and
> time spent in each low-power LTSSM state) and
> - one 32-bit counter for Event counting (error and non-error events for
> a specified lane)
>
> Note: There is no interrupt for counter overflow.
Beautiful, that's very clear.
Bjorn
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: chengyou@linux.alibaba.com, kaishen@linux.alibaba.com,
yangyicong@huawei.com, will@kernel.org,
Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com,
robin.murphy@arm.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
rdunlap@infradead.org, mark.rutland@arm.com,
zhuo.song@linux.alibaba.com, renyu.zj@linux.alibaba.com
Subject: Re: [PATCH v7 3/4] drivers/perf: add DesignWare PCIe PMU driver
Date: Mon, 16 Oct 2023 09:38:05 -0500 [thread overview]
Message-ID: <20231016143805.GA1207929@bhelgaas> (raw)
In-Reply-To: <4147832a-1f24-5993-dfb6-59f420a17481@linux.alibaba.com>
On Mon, Oct 16, 2023 at 11:00:13AM +0800, Shuai Xue wrote:
> On 2023/10/14 00:30, Bjorn Helgaas wrote:
> > On Fri, Oct 13, 2023 at 11:46:44AM +0800, Shuai Xue wrote:
> >> On 2023/10/13 00:25, Bjorn Helgaas wrote:
> >>> On Thu, Oct 12, 2023 at 11:28:55AM +0800, Shuai Xue wrote:
> >>>> This commit adds the PCIe Performance Monitoring Unit (PMU)
> >>>> driver support for T-Head Yitian SoC chip. Yitian is based on
> >>>> the Synopsys PCI Express Core controller IP which provides
> >>>> statistics feature. The PMU is not a PCIe Root Complex
> >>>> integrated End Point(RCiEP) device but only register counters
> >>>> provided by each PCIe Root Port.
> @@ -447,10 +447,10 @@ static int dwc_pcie_pmu_event_add(struct perf_event *event, int flags)
> u32 ctrl;
>
> /* Only one counter and it is in use */
> - if (pcie_pmu->event)
> + if (pcie_pmu->event[type])
> return -ENOSPC;
>
> - pcie_pmu->event = event;
> + pcie_pmu->event[type] = event;
OK, makes good sense (probably update the comment also, e.g., "one
counter of each type").
> }
> > If so, I might word this as:
> >
> > Each Root Port contains one counter that can be used for either:
> >
> > - Time-Based Analysis (RX/TX data throughput and time spent in
> > each low-power LTSSM state) or
> >
> > - Event counting (error and non-error events for a specified lane)
> >
> > There is no interrupt for counter overflow.
>
> Based on above, I change the word to:
>
> To facilitate collection of statistics the controller provides the
> following two features for each Root Port:
>
> - one 64-bit counter for Time Based Analysis (RX/TX data throughput and
> time spent in each low-power LTSSM state) and
> - one 32-bit counter for Event counting (error and non-error events for
> a specified lane)
>
> Note: There is no interrupt for counter overflow.
Beautiful, that's very clear.
Bjorn
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-16 14:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 3:28 [PATCH v7 0/4] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Shuai Xue
2023-10-12 3:28 ` Shuai Xue
2023-10-12 3:28 ` [PATCH v7 1/4] docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Shuai Xue
2023-10-12 3:28 ` Shuai Xue
2023-10-12 3:28 ` [PATCH v7 2/4] PCI: Add Alibaba Vendor ID to linux/pci_ids.h Shuai Xue
2023-10-12 3:28 ` Shuai Xue
2023-10-12 14:59 ` Bjorn Helgaas
2023-10-12 14:59 ` Bjorn Helgaas
2023-10-12 15:27 ` Bjorn Helgaas
2023-10-12 15:27 ` Bjorn Helgaas
2023-10-13 1:07 ` Shuai Xue
2023-10-13 1:07 ` Shuai Xue
2023-10-12 3:28 ` [PATCH v7 3/4] drivers/perf: add DesignWare PCIe PMU driver Shuai Xue
2023-10-12 3:28 ` Shuai Xue
2023-10-12 16:25 ` Bjorn Helgaas
2023-10-12 16:25 ` Bjorn Helgaas
2023-10-13 3:46 ` Shuai Xue
2023-10-13 3:46 ` Shuai Xue
2023-10-13 8:41 ` Jonathan Cameron
2023-10-13 8:41 ` Jonathan Cameron
2023-10-13 10:45 ` Shuai Xue
2023-10-13 10:45 ` Shuai Xue
2023-10-13 16:30 ` Bjorn Helgaas
2023-10-13 16:30 ` Bjorn Helgaas
2023-10-16 3:00 ` Shuai Xue
2023-10-16 3:00 ` Shuai Xue
2023-10-16 14:38 ` Bjorn Helgaas [this message]
2023-10-16 14:38 ` Bjorn Helgaas
2023-10-17 0:48 ` Shuai Xue
2023-10-17 0:48 ` Shuai Xue
2023-10-12 3:28 ` [PATCH v7 4/4] MAINTAINERS: add maintainers for " Shuai Xue
2023-10-12 3:28 ` Shuai Xue
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=20231016143805.GA1207929@bhelgaas \
--to=helgaas@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=chengyou@linux.alibaba.com \
--cc=kaishen@linux.alibaba.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rdunlap@infradead.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=yangyicong@huawei.com \
--cc=zhuo.song@linux.alibaba.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.