Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
04c9ccdd
Commit
04c9ccdd
authored
8 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Update TODO list and some Kconfig comments.
parent
c2b620b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TODO
+24
-1
24 additions, 1 deletion
TODO
sched/Kconfig
+11
-1
11 additions, 1 deletion
sched/Kconfig
with
35 additions
and
2 deletions
TODO
+
24
−
1
View file @
04c9ccdd
...
...
@@ -19,7 +19,7 @@ nuttx/:
(8) Kernel/Protected Build
(3) C++ Support
(6) Binary loaders (binfmt/)
(1
2
) Network (net/, drivers/net)
(1
3
) Network (net/, drivers/net)
(4) USB (drivers/usbdev, drivers/usbhost)
(0) Other drivers (drivers/)
(12) Libraries (libc/, libm/)
...
...
@@ -1032,6 +1032,29 @@ o Network (net/, drivers/net)
Status: Open
Priority: Low
Title: ETHERNET WITH MULTIPLE LPWORK THREADS
Description: Recently, Ethernet drivers were modified to support multiple
work queue structures. The question was raised: "My only
reservation would be, how would this interact in the case of having CONFIG_STM32_ETHMAC_LPWORK and CONFIG_SCHED_LPNTHREADS
> 1? Can it be guaranteed that one work item won't be
interrupted and execution switched to another? I think so but
am not 100% confident."
I suspect that you right. There are probably vulnerabilities
in the CONFIG_STM32_ETHMAC_LPWORK with CONFIG_SCHED_LPNTHREADS
> 1 case. But that really doesn't depend entirely upon the
change to add more work queue structures. Certainly with only
work queue structure you would have concurrent Ethernet
operations in that multiple LP threads; just because the work
structure is available, does not mean that there is not dequeued
work in progress. The multiple structures probably widens the
window for that concurrency, but does not create it.
The current Ethernet designs depend upon a single work queue to
serialize data. In the case of muliple LP threads, some
additional mechanism would have to be added to enforce that
serialization.
o USB (drivers/usbdev, drivers/usbhost)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...
This diff is collapsed.
Click to expand it.
sched/Kconfig
+
11
−
1
View file @
04c9ccdd
...
...
@@ -1220,7 +1220,17 @@ config SCHED_LPNTHREADS
This options is required to support, for example, I/O operations
that stall waiting for input. If there is only a single thread,
then the entire low-priority queue processing stalls in such cases.
Such behavior is necessary to support asynchronous I/O, AIO (for example).
Such behavior is necessary to support asynchronous I/O, AIO (for
example).
CAUTION: Some drivers, such as most Ethernet drivers, use the work
queue to serialize network operations. The will also use the low-
priority work queue if it is available. If there are multiple low-
priority worker thread, then this can result in the loss of that
serialization. There may be concurrent Ethernet operations running
on different LP threads and this could lead to a failure. You may
need to visit the use of the LP work queue on your configuration
is you select CONFIG_SCHED_LPNTHREADS > 1
config SCHED_LPWORKPRIORITY
int "Low priority worker thread priority"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment