Re: [PATCH v2 1/5] can: enable multi-queue for SocketCAN devices
From: Marc Kleine-Budde
Date: Fri Jul 20 2018 - 10:35:00 EST
On 06/13/2018 04:37 PM, Mark Jonas wrote:
> From: Zhu Yi <yi.zhu5@xxxxxxxxxxxx>
>
> The existing SocketCAN implementation provides alloc_candev() to
> allocate a CAN device using a single Tx and Rx queue. This can lead to
> priority inversion in case the single Tx queue is already full with low
> priority messages and a high priority message needs to be sent while the
> bus is fully loaded with medium priority messages.
>
> This problem can be solved by using the existing multi-queue support of
> the network subsytem. The commit makes it possible to use multi-queue in
> the CAN subsystem in the same way it is used in the Ethernet subsystem
> by adding an alloc_candev_mqs() call and accompanying macros. With this
> support a CAN device can use multi-queue qdisc (e.g. mqprio) to avoid
> the aforementioned priority inversion.
>
> The exisiting functionality of alloc_candev() is the same as before.
>
> CAN devices need to have prioritized multiple hardware queues or are
> able to abort waiting for arbitration to make sensible use of
> multi-queues.
>
> Signed-off-by: Zhu Yi <yi.zhu5@xxxxxxxxxxxx>
> Signed-off-by: Mark Jonas <mark.jonas@xxxxxxxxxxxx>
> Reviewed-by: Heiko Schocher <hs@xxxxxxx>
Applied to linux-can-next.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature