tech-kern archive

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

Re: usb_rem_task_wait





On Jul 1, 2018, at 8:18 AM, Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:

Date: Sun, 01 Jul 2018 08:02:11 -0700
From: Jason Thorpe <thorpej%me.com@localhost>

I've been thinking about this interface a bit... it would be handy
to have a version of it for some non-usb stuff I have in the hopper.
Should it be generalized and moved to sys/kern?

https://mail-index.netbsd.org/tech-kern/2014/07/23/msg017394.html

Had to visit the passport office yesterday, and since I had some time to kill I took a look at this.

Overall, looks sane and has the most important usability property over work queues -- no need to track if a task is already scheduled.

Couple of comments / questions --

1- Seems to depend on another facility -- threadpool -- that I also found in your sandbox and took a peek at.  Wondering that other applications for threadpool that you had in mind.

2- Mildly annoying that "tasks" don't have a simply way to get the context they need to run -- they don't contain a "void *ctx", so users of the API are reduced to doing memory offset shenanigans to recover their context.  Not a deal-breaker, but wondering if burning the memory on a pointer would be worth the convenience factor.



Might have some newer drafts floating around; can dig them up if
interested.


But I was hoping to make something small and uncontroversial first
that might be fit for inclusion at least in 8.1 if not in 8.0 at this
late stage.  (Can never remember what the ABI compatibility rules
are.)

-- thorpej



Home | Main Index | Thread Index | Old Index