bunnie
0aa2f21f0b
make scheduler quantum a visible parameter, and adjust to 10ms down from 20ms
2022-05-12 17:49:03 +08:00
bunnie
1261d73451
remove execution gate server and use deferred callback idiom instead
...
reduces one connection on all PIDs that require suspend/resume
callbacks; lightens kernel by about 16k runtime load
2022-04-07 01:13:49 +08:00
bunnie
ec4515579c
stashing a bit of code so i can remember how to conjure a delay in susres
2022-03-31 01:44:48 +08:00
bunnie
8b5ad2657b
an aborted attempt at doing a clean-shutdown for hosted mode
...
This doesn't work because the shutdown call destroys all the servers then terminates
the processes. But, the problem is that the processes are still
running, but servers are disappearing. So what you end up with is a
panic when the first message gets delivered to a server that no longer
exists, and then you end up with the program hanging on that panic
because some servers haven't been destroyed/exited yet and are now
just spinning waiting to be scheduled. so the call works in the tidy
kernel test cases but to get it to work on a full OS you'd need to
have a way to put every server into an eternal blocking state before
making the shutdown call (to prevent new messages from being issued
while servers are going away), which is more work than i'm willing to
put into the problem right now.
2022-03-31 01:10:58 +08:00
bunnie
c503316c3d
refactor suspend/resume ordering
...
Add a "Later" stage, and have exactly one "Last" stage.
"Last" to suspend is the ticktimer -- this is crucial for
basically everything else to work. The other really
low level stuff that needs to work to the last minute is
now in the "Later" bin.
2022-03-30 02:30:39 +08:00
bunnie
5a1139a367
move cache flush on susres to just before the suspend event
...
- also nail down the interrupt handlers from firing from the COM
during suspend
- ensure that connects don't happen while scanning
2022-01-27 22:05:38 +08:00
bunnie
3f2f304202
refactor connection manager to be more responsive to suspend/resume
2022-01-27 13:46:43 +08:00
bunnie
18130cddae
fix suspend/resume regression
...
had to pin down the correct order of events to avoid lockups on suspend
2022-01-17 22:46:18 +08:00
bunnie
c5fe1bc99b
add sequencing to suspend/resume order of operations
...
this is necessary because we want to make sure that the SPINOR
service does not shut down before the PDDB service finishes syncing
its disks.
2022-01-10 13:45:56 +08:00
bunnie
8da2364832
clean out some old debug cruft in the susres crate
2021-10-30 19:15:32 +08:00
bunnie
5df4e38caf
add some debug helpers for suspend/resume
2021-09-18 02:19:43 +08:00
bunnie
dbab3d2b27
adjust L2 cache flush region to 512k
...
although te cache is only 128k, experiments show that the cache
is not reliably flushed until 512k is written. Not sure why...
2021-08-29 18:28:25 +08:00
bunnie
f4232a3236
stabilize suspend/resume a bit
...
- introduce wfi backoff during the suspend process
- increase the region of cache flush - seems to improve
stability
- remove some print calls to avoid interference during
the sleeping process
2021-08-29 12:04:20 +08:00
bunnie
e2ce3cad2c
make sure that the power states get set correctly early in the resume process
2021-08-27 15:47:27 +08:00
bunnie
57574495d8
handle case of sleep request before resume is fully completed
2021-08-24 23:35:32 +08:00
Sean Cross
b86e0a65cd
services: recognize xous as a hardware OS
...
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
1949c1bbc9
a semblance of sanity, finally
2021-07-09 23:01:50 +08:00
bunnie
6c697de512
add l2 cache support (suspend/resume flushing)
...
also noted some performance benchmark improvements
2021-07-05 17:05:10 +08:00
bunnie
3f08dcccee
increase the susres timeout to be less aggressive
...
now that we have auto-clock throttling, fast SR cycles are not
as critical to power saving. They are more a mechanism to be
invoked based on user command, not automatically, and thus it's
not as critical to shut things down ungracefully if the CPU is
heavily loaded.
2021-06-30 19:05:20 +08:00
bunnie
aa967a5a17
quiet up hosted mode build warnings
2021-06-18 22:37:08 +08:00
bunnie
eee9f4e765
refactor xous-names to permit only a fixed number of connections
...
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.
this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
fadc9c29ab
Merge remote-tracking branch 'origin/master' into bunnie-dev
2021-06-02 03:59:25 +08:00
bunnie
afe8d8733d
updates to use the always-on power domain timers
2021-05-30 04:29:03 +08:00
bunnie
7529628053
partial progress on EC updater
2021-05-24 04:34:50 +08:00
Sean Cross
eb7895d601
xous: add a return code to TerminateProcess
...
As part of this refactor, make `terminate_process()` a divergent call.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
bunnie
d44ad58637
sha512 now compiling, at least.
2021-05-20 03:29:26 +08:00
bunnie
69576695bf
give a little more time for the suspend
...
right now some graphics ops aren't completing.
2021-05-11 16:51:52 +08:00
bunnie
7dd66a4c18
playback is mostly working and stable
2021-05-07 05:42:39 +08:00
bunnie
0621fed5d6
back up debugging statements
2021-05-02 12:51:41 +08:00
bunnie
b17753ce8b
retrofit the rest of the servers for suspend/resume
...
we can now do suspend/resume in the xous chat!
2021-05-02 01:38:44 +08:00
bunnie
c7f1fe0817
cleanup after debugging ticktimer
...
the problem was that the load signal was not being respected
by the hardware, small patch to FPGA required but now all is OK.
2021-05-01 20:56:12 +08:00
bunnie
b28dff273f
intermediate checkin figuring out ticktimer issue
...
seems to be a hardware problem with the loading routine
2021-05-01 19:13:22 +08:00
bunnie
087bb39ea7
chase down some bugs
...
noted there is a heisenbug on the ticktimer, it only manifests
when the log level is at info. go figure!
2021-05-01 02:26:28 +08:00
bunnie
142d512ffb
remove a redundant check
2021-05-01 00:49:27 +08:00
bunnie
46fe3885dc
cleanup more turds left over during the bringup of suspend/resume
2021-05-01 00:35:32 +08:00
bunnie
260b154741
clean up some boot process holdovers
2021-04-30 23:28:31 +08:00
bunnie
640ddb48e8
suspend/resume now works to hardware
2021-04-30 19:29:36 +08:00
bunnie
7053c2b7c6
able to detect the clean suspend, now figuring out how to resume
2021-04-30 05:00:03 +08:00
bunnie
0e2d57c9fb
retrofit the kernel and loader to handle resume
...
and now the even harder debuggening begins...zomg o_O
2021-04-30 01:55:38 +08:00
bunnie
1014b53726
clean up some hosted mode errors
...
hosted mode is still a bit broken, but we'll figure that
out later. at least it compiles.
2021-04-29 17:24:38 +08:00
bunnie
6e1e74ed84
a minimal but successful touch-and-go suspend/resume cycle
2021-04-29 16:37:43 +08:00
bunnie
bbcf698ff3
flesh out a simple touch-and-go suspend/resume demo loop
...
now the debuggening begins. lord help us.
2021-04-29 02:56:53 +08:00
bunnie
768eb548be
fix some typos etc.
2021-04-29 00:23:18 +08:00
bunnie
2df2e654dd
add some more comments
2021-04-28 19:31:08 +08:00
bunnie
cad9c15849
intermediate save of suspend resume
...
building an awful rube-goldberg contraption of a "clean-suspend"
record.
2021-04-28 19:28:04 +08:00
bunnie
88f5199ba2
refactor os_timer to be integral to susres
2021-04-28 17:24:08 +08:00
bunnie
3043769170
move the os_timer into the susres server, so we can suspend it
...
also clean up various syntax errors
2021-04-28 15:38:56 +08:00
bunnie
3153d6aa66
intermediate progress on suspend/resume
2021-04-28 04:15:25 +08:00
bunnie
d2e9d35d37
modify loader to block out suspend resume pages per Xobs review
2021-04-27 18:47:55 +08:00
bunnie
68ed591189
start to flesh out API, allocate clean suspend page
2021-04-27 03:56:57 +08:00