Re: Disable Network Statistics - CAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+ Martin

On 31/07/2019 16.16, Marc Kleine-Budde wrote:
On 7/31/19 3:38 PM, Oliver Hartkopp wrote:
Hi all,

On 31/07/2019 03.49, Tom Prohaszka wrote:
We are using the MCP25xxfd driver.  A comment in the code indicated
that during testing, the network statistics were disabled to achieve
high utilization of the CAN bus.  Another comment indicated that when
network statistics were re-enabled, a 60% decrease in throughput
occurred.

Can you point me to these comments?

My question is, how can we disable the network statistics for CAN, and
if not possible for CAN, globally.

there seem to be tons of MCP25XXFD_DEBUGFS_STATS_*() macros.

I'm not sure that incrementing some counters will cause a performace
degration of 60%.

https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/tree/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_can_int.c?h=mcp25xxfd&id=9b2ffbb925a0c32ea064c0a91b6bacb33d5e877a#n131

https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/tree/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_can_debugfs.h?h=mcp25xxfd&id=9b2ffbb925a0c32ea064c0a91b6bacb33d5e877a

We had to purge all the debug stuff when mainlining the CAN subsystem
and I wonder if this is really NEEDED.

When the driver is in mainline Linux we can assume it to work - and not
to be debugged anymore.

Additionally the CAN_DEBUG_DEVICES Kconfig option could have been used
to debug potential pitfalls.

IMO the debugfs stuff should be removed completely.

Or at least make it a per driver option.

Looking at

https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/tree/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_can_priv.h?h=mcp25xxfd&id=9b2ffbb925a0c32ea064c0a91b6bacb33d5e877a#n134

the driver logs extensively almost everything what the CAN controller offers.

At least this debugging output should depend on

CAN_DEBUG_DEVICES && CONFIG_DEBUG_FS

but I still wonder if you need u64 tx_brs_count or
u8 brs[MCP25XXFD_CAN_RX_DLC_HISTORY_SIZE]

These are statistics about CAN frame content. Why would we need this in normal operation or even in debugging cases?

Regards,
Oliver



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux