Tom Rini
233fda6af6
Merge patch series "Uthreads"
...
Jerome Forissier <jerome.forissier@linaro.org> says:
This series introduces threads and uses them to improve the performance
of the USB bus scanning code and to implement background jobs in the
shell via two new commands: 'spawn' and 'wait'.
The threading framework is called 'uthread' and is inspired from the
barebox threads [2]. setjmp() and longjmp() are used to save and
restore contexts, as well as a non-standard extension called initjmp().
This new function is added in several patches, one for each
architecture that supports HAVE_SETJMP. A new symbol is defined:
HAVE_INITJMP. Two tests, one for initjmp() and one for the uthread
scheduling, are added to the lib suite.
After introducing threads and making schedule() and udelay() a thread
re-scheduling point, the USB stack initialization is modified to benefit
from concurrency when UTHREAD is enabled, where uthreads are used in
usb_init() to initialize and scan multiple busses at the same time.
The code was tested on arm64 and arm QEMU with 4 simulated XHCI buses
and some devices. On this platform the USB scan takes 2.2 s instead of
5.6 s. Tested on i.MX93 EVK with two USB hubs, one ethernet adapter and
one webcam on each, "usb start" takes 2.4 s instead of 4.6 s.
Finally, the spawn and wait commands are introduced, allowing the use of
threads from the shell. Tested on the i.MX93 EVK with a spinning HDD
connected to USB1 and the network connected to ENET1. The USB plus DHCP
init sequence "spawn usb start; spawn dhcp; wait" takes 4.5 seconds
instead of 8 seconds for "usb start; dhcp".
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=446674
[2] https://github.com/barebox/barebox/blob/master/common/bthread.c
Link: https://lore.kernel.org/r/20250418141114.2056981-1-jerome.forissier@linaro.org
2025-04-23 13:21:39 -06:00
..
2025-04-08 16:23:27 -06:00
2025-04-11 13:25:31 +02:00
2025-04-23 22:12:06 +08:00
2025-02-27 12:11:02 -06:00
2025-04-10 22:32:55 -03:00
2025-03-25 16:31:32 +08:00
2025-03-26 14:07:37 -06:00
2024-11-25 23:07:37 -03:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2025-04-22 11:47:39 +08:00
2024-10-11 11:44:48 -06:00
2024-12-28 11:59:42 -06:00
2025-04-12 09:44:02 +03:00
2025-03-19 03:36:19 +01:00
2024-07-26 01:28:11 +02:00
2025-02-11 20:12:36 -06:00
2025-04-23 13:19:44 -06:00
2024-10-17 03:12:47 +02:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2025-01-22 15:58:03 -06:00
2024-05-20 13:35:03 -06:00
2025-04-22 15:08:47 -06:00
2024-11-03 21:27:12 -06:00
2024-10-24 09:45:55 +02:00
2024-10-24 09:48:14 +02:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-10-03 09:08:29 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-07-15 00:17:27 +01:00
2024-06-13 16:30:48 -06:00
2024-10-24 11:20:58 -06:00
2025-03-26 13:28:08 +02:00
2025-02-19 18:49:47 -06:00
2024-05-20 13:35:03 -06:00
2024-08-26 14:05:38 -06:00
2024-10-11 11:44:48 -06:00
2025-01-15 08:48:43 -06:00
2025-04-03 11:41:55 -06:00
2025-04-07 16:35:43 -06:00
2025-01-15 08:48:42 -06:00
2024-10-25 14:22:24 -06:00
2025-04-03 11:43:22 -06:00
2024-07-29 15:01:04 -06:00
2025-03-15 10:35:00 +01:00
2024-10-18 14:10:22 -06:00
2025-03-24 08:51:34 -03:00
2025-04-04 12:26:36 -06:00
2024-09-18 13:01:00 -06:00
2025-03-14 13:37:54 +02:00
2025-01-22 15:58:03 -06:00
2025-01-22 10:22:34 +01:00
2025-03-16 14:56:16 +01:00
2024-05-20 13:35:03 -06:00
2024-11-20 17:57:58 +01:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-08-19 16:09:06 +09:00
2024-07-29 15:01:04 -06:00
2024-06-07 10:47:59 -06:00
2024-05-20 13:35:03 -06:00
2025-01-05 02:30:49 +01:00
2024-06-10 11:43:37 +02:00
2025-04-11 13:20:38 +02:00
2024-05-01 08:39:16 +02:00
2025-01-28 08:59:23 +02:00
2024-09-21 10:59:06 +02:00
2025-03-26 13:28:08 +02:00
2024-06-14 12:59:07 -06:00
2024-12-06 16:37:43 -06:00
2025-02-14 10:19:24 -06:00
2024-05-20 13:35:03 -06:00
2024-08-26 14:05:38 -06:00
2024-10-11 11:44:48 -06:00
2024-09-21 11:02:25 +02:00
2025-04-21 11:07:04 -06:00
2024-11-03 21:27:12 -06:00
2024-07-29 15:01:04 -06:00
2024-11-01 13:37:58 -06:00
2024-10-30 21:44:39 +01:00
2024-06-07 14:05:03 -06:00
2024-04-18 08:29:35 -06:00
2024-07-09 09:15:37 +02:00
2025-03-07 11:50:22 -06:00
2025-03-26 13:28:08 +02:00
2024-12-31 10:57:54 -06:00
2024-09-24 13:41:20 -06:00
2025-02-05 16:22:55 +01:00
2025-04-02 20:00:59 -06:00
2025-04-02 20:00:59 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-10-04 09:15:15 -03:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2025-04-04 12:25:02 -06:00
2024-05-24 13:40:03 -06:00
2024-09-19 10:52:50 +03:00
2024-09-09 17:18:04 +02:00
2024-09-21 10:58:38 +02:00
2024-07-29 15:01:04 -06:00
2024-10-03 11:52:16 -06:00
2024-12-02 07:40:39 -06:00
2024-05-20 13:35:03 -06:00
2024-08-13 06:23:15 +02:00
2024-10-11 11:44:48 -06:00
2025-04-07 16:35:43 -06:00
2024-11-09 08:54:19 -03:00
2024-05-20 13:35:03 -06:00
2025-04-14 08:59:39 -06:00
2025-03-10 07:41:16 +01:00
2024-10-11 11:44:48 -06:00
2024-10-17 15:38:50 -06:00
2024-10-27 17:24:13 -06:00
2024-12-04 14:30:18 -06:00
2024-06-19 12:07:44 -06:00
2024-06-19 12:07:44 -06:00
2024-07-29 15:01:04 -06:00
2025-02-07 11:39:24 -06:00
2024-05-20 13:35:03 -06:00
2024-12-31 10:58:30 -06:00
2025-01-24 14:34:40 -06:00
2025-03-24 11:12:33 -06:00
2025-01-26 11:06:56 +01:00
2024-05-20 13:35:03 -06:00
2024-10-25 14:22:24 -06:00
2025-04-03 11:41:54 -06:00
2024-07-29 15:01:04 -06:00
2025-03-05 12:14:04 -06:00
2025-04-03 16:54:49 -06:00
2024-11-15 14:32:02 +01:00
2024-11-04 16:41:38 -06:00
2024-07-29 15:01:04 -06:00
2025-03-11 23:06:18 +01:00
2025-04-23 10:41:11 +08:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-10-24 11:21:48 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2025-04-23 09:58:07 +02:00
2025-04-23 10:02:49 +02:00
2025-04-23 10:02:49 +02:00
2025-04-23 10:02:49 +02:00
2024-10-16 11:11:56 -06:00
2024-11-25 23:07:37 -03:00
2024-12-14 09:32:59 -06:00
2024-09-30 17:48:12 -06:00
2024-11-20 17:57:58 +01:00
2024-07-29 15:01:04 -06:00
2024-09-03 09:12:00 -06:00
2025-01-22 16:43:54 +01:00
2024-05-20 13:35:03 -06:00
2025-03-19 03:38:51 +01:00
2025-04-18 09:35:39 -06:00
2024-12-30 15:55:07 -06:00
2025-01-15 08:48:42 -06:00
2024-05-20 13:35:03 -06:00
2025-04-16 16:51:45 -06:00
2024-09-12 17:35:37 +02:00
2024-05-20 13:35:03 -06:00
2024-09-12 17:35:37 +02:00
2025-04-10 20:55:53 -06:00
2024-05-02 10:34:34 -06:00
2024-10-11 11:44:48 -06:00
2024-10-11 11:44:48 -06:00
2025-03-10 09:22:35 +01:00
2025-04-23 13:19:44 -06:00
2024-05-20 13:35:03 -06:00
2025-01-14 14:29:29 -06:00
2025-01-14 14:29:29 -06:00
2025-01-14 14:29:29 -06:00
2024-07-29 15:01:04 -06:00
2024-10-24 09:41:52 +02:00
2025-01-22 09:52:22 -06:00
2025-04-16 19:57:19 -06:00
2024-10-13 17:20:26 +03:00
2025-02-03 16:01:36 -06:00
2025-02-03 16:01:36 -06:00
2024-05-20 13:35:03 -06:00
2024-10-10 16:02:20 -06:00
2025-03-10 09:22:35 +01:00
2024-10-11 11:44:48 -06:00
2024-10-14 17:58:12 -06:00
2024-10-11 11:44:48 -06:00
2025-02-28 08:41:54 -06:00
2024-07-29 15:01:04 -06:00
2025-02-11 20:10:58 -06:00
2025-01-07 15:45:51 +02:00
2025-01-09 11:11:10 -06:00
2025-01-28 08:58:41 +02:00
2025-01-01 10:40:33 -06:00
2024-08-08 09:28:00 +02:00
2024-10-11 11:44:48 -06:00
2024-07-29 15:01:04 -06:00
2024-09-18 13:01:00 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2025-04-23 13:19:44 -06:00
2025-02-03 16:01:36 -06:00
2025-03-08 16:35:46 +02:00
2024-10-18 14:10:22 -06:00
2025-01-22 17:08:23 -06:00
2024-05-20 13:35:03 -06:00
2024-11-13 08:14:23 -06:00
2024-10-23 06:52:38 +02:00
2025-04-16 13:44:44 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2025-04-16 13:42:06 +02:00
2024-08-05 16:13:26 +02:00