linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Questions about userspace SPI async IO support
@ 2024-03-09  5:41 Jesse T
  2024-03-11 13:47 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse T @ 2024-03-09  5:41 UTC (permalink / raw)
  To: linux-spi; +Cc: Mark Brown

Hello,

As far as I know, the SPI userspace API has "no async I/O support;
everything is purely synchronous."
https://docs.kernel.org/spi/spidev.html

I would like to add support for userspace SPI async IO.
Why hasn't it been added?

Is it not as simple as adding the async equivalent of SPI_IOC_MESSAGE
to ioctl, or is that not a valid way to accomplish this?

Thanks,
Jesse Taube

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Questions about userspace SPI async IO support
  2024-03-09  5:41 Questions about userspace SPI async IO support Jesse T
@ 2024-03-11 13:47 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-03-11 13:47 UTC (permalink / raw)
  To: Jesse T; +Cc: linux-spi

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

On Sat, Mar 09, 2024 at 12:41:56AM -0500, Jesse T wrote:

> I would like to add support for userspace SPI async IO.
> Why hasn't it been added?

Nobody proposed anything.

> Is it not as simple as adding the async equivalent of SPI_IOC_MESSAGE
> to ioctl, or is that not a valid way to accomplish this?

There's the completion part of things - you need a way to know that at
least some of the messages have actually been handled, especially on the
read side where you're going to look at the data.  You also have to
worry about management of the storage used for everything.

TBH with modern systems it's unclear if async offers useful benefits
outside of an interrupt context - the cost of synchronisation between
CPUs gets very expensive very quickly.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-11 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-09  5:41 Questions about userspace SPI async IO support Jesse T
2024-03-11 13:47 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).