beagleboard / linux

The official Read Only BeagleBoard and BeagleBone kernel repository https://git.beagleboard.org/beagleboard/linux
http://beagleboard.org/source
Other
721 stars 566 forks source link

remoteproc write to PRU over rpmsg device blocks even when set non-blocking #239

Closed buzmeg closed 3 years ago

buzmeg commented 4 years ago

When the PRU buffers fill up, they block for 15 seconds and then fail with ERESTARTSYS.

This is ... sorta okay ... when in blocking mode. However, if O_NONBLOCK is set, the system should immediately come back with ENOMEM on an attempt to write when the PRU buffers are full.

The problem seems to be that rpmsg_pru_write needs to call rpmsg_trysend when O_NONBLOCK is set.

See: rpmsg_eptdev_write_iter line 244 in rpmsg_char.c for an example: https://github.com/beagleboard/linux/blob/38b462b53e1ce18b0727a6852c8c87dd96f56f6f/drivers/rpmsg/rpmsg_char.c#L244

See this Google Groups thread for more discussion: https://groups.google.com/forum/#!category-topic/beagleboard/6Ch7Do4Hm7k

Thanks.

pdp7 commented 4 years ago

@MarkAYoder have you run into this PRU issue?

buzmeg commented 4 years ago

Yes. I'm the one who hit this in the original thread.

MarkAYoder commented 4 years ago

@pdp7 I haven't seen this issue. Sorry.

buzmeg commented 4 years ago

Any resolution on this?

buzmeg commented 3 years ago

Bumping this two months later.

buzmeg commented 3 years ago

This is still sitting.