mbox series

[v4,net-next,0/2] use bulk reads for ocelot statistics

Message ID 20220128200549.1634446-1-colin.foster@in-advantage.com (mailing list archive)
Headers show
Series use bulk reads for ocelot statistics | expand

Message

Colin Foster Jan. 28, 2022, 8:05 p.m. UTC
Ocelot loops over memory regions to gather stats on different ports.
These regions are mostly continuous, and are ordered. This patch set
uses that information to break the stats reads into regions that can get
read in bulk.

The motiviation is for general cleanup, but also for SPI. Performing two
back-to-back reads on a SPI bus require toggling the CS line, holding,
re-toggling the CS line, sending 3 address bytes, sending N padding
bytes, then actually performing the read. Bulk reads could reduce almost
all of that overhead, but require that the reads are performed via
regmap_bulk_read.

v1 > v2: reword commit messages
v2 > v3: correctly mark this for net-next when sending
v3 > v4: calloc array instead of zalloc per review

Colin Foster (2):
  net: mscc: ocelot: add ability to perform bulk reads
  net: mscc: ocelot: use bulk reads for stats

 drivers/net/ethernet/mscc/ocelot.c    | 74 ++++++++++++++++++++++-----
 drivers/net/ethernet/mscc/ocelot_io.c | 13 +++++
 include/soc/mscc/ocelot.h             | 12 +++++
 3 files changed, 86 insertions(+), 13 deletions(-)

Comments

Jakub Kicinski Jan. 31, 2022, 7:56 p.m. UTC | #1
On Fri, 28 Jan 2022 12:05:47 -0800 Colin Foster wrote:
> Ocelot loops over memory regions to gather stats on different ports.
> These regions are mostly continuous, and are ordered. This patch set
> uses that information to break the stats reads into regions that can get
> read in bulk.
> 
> The motiviation is for general cleanup, but also for SPI. Performing two
> back-to-back reads on a SPI bus require toggling the CS line, holding,
> re-toggling the CS line, sending 3 address bytes, sending N padding
> bytes, then actually performing the read. Bulk reads could reduce almost
> all of that overhead, but require that the reads are performed via
> regmap_bulk_read.

This got into Changes Requested state in patchwork, I'm not sure why.

I revived it and will apply it by the end of the day PST if nobody
raises comments.
Vladimir Oltean Jan. 31, 2022, 8:06 p.m. UTC | #2
On Mon, Jan 31, 2022 at 11:56:21AM -0800, Jakub Kicinski wrote:
> On Fri, 28 Jan 2022 12:05:47 -0800 Colin Foster wrote:
> > Ocelot loops over memory regions to gather stats on different ports.
> > These regions are mostly continuous, and are ordered. This patch set
> > uses that information to break the stats reads into regions that can get
> > read in bulk.
> > 
> > The motiviation is for general cleanup, but also for SPI. Performing two
> > back-to-back reads on a SPI bus require toggling the CS line, holding,
> > re-toggling the CS line, sending 3 address bytes, sending N padding
> > bytes, then actually performing the read. Bulk reads could reduce almost
> > all of that overhead, but require that the reads are performed via
> > regmap_bulk_read.
> 
> This got into Changes Requested state in patchwork, I'm not sure why.
> 
> I revived it and will apply it by the end of the day PST if nobody
> raises comments.

Maybe this is the reason?
https://patchwork.kernel.org/project/netdevbpf/patch/20220125071531.1181948-3-colin.foster@in-advantage.com/#24717872
Jakub Kicinski Jan. 31, 2022, 8:13 p.m. UTC | #3
On Mon, 31 Jan 2022 20:06:05 +0000 Vladimir Oltean wrote:
> On Mon, Jan 31, 2022 at 11:56:21AM -0800, Jakub Kicinski wrote:
> > This got into Changes Requested state in patchwork, I'm not sure why.
> > 
> > I revived it and will apply it by the end of the day PST if nobody
> > raises comments.  
> 
> Maybe this is the reason?
> https://patchwork.kernel.org/project/netdevbpf/patch/20220125071531.1181948-3-colin.foster@in-advantage.com/#24717872

Thanks a lot! Back to CR it goes.