Commits (56)
-
Michael Quigley authoredb47f1d2f
-
Michael Quigley authored91713cc9
-
Michael Quigley authoredfb125ea3
-
Michael Quigley authored
Finish context switch benchmark test. Still need to disable NMIs and preemption to decrease variance in results.
a5d61f05 -
Michael Quigley authored
Disabled preemption and local IRQs. Discovered another stack bug in the Barrefish code where thc_done does not adequately clean up the used stacks resulting in memory leaks.
8b94fe30 -
Michael Quigley authorede932e9fd
-
Michael Quigley authored
Added tests for timing thread creation. Only tests lazy thread creation for now. Refactored older test code as well.
e8ff16ed -
Michael Quigley authorede59b4b94
-
Michael Quigley authoreda92837e8
-
Charlie Jacobsen authored9f662cc8
-
Charlie Jacobsen authoredd64a5f3f
-
Charlie Jacobsen authored9ad24050
-
Charles Jacobsen authored030b1af0
-
Charlie Jacobsen authoredf0396801
-
Charlie Jacobsen authorede6867fb4
-
Michael Quigley authored5c437b5d
-
Michael Quigley authored9731fdc3
-
Michael Quigley authored39d3eb1c
-
Charlie Jacobsen authored
We don't want to have to hold on to the request message until we reply. Instead, the libasync user passes in a "request cookie", that is just the message id. The libasync user obtains the cookie via thc_get_request_cookie. Not tested yet.
12b9f2e4 -
Charlie Jacobsen authored
Looks like we were both headed in the same direction ...
daf9c1ae -
Charlie Jacobsen authored
This is now fulfilled by thc_ipc_reply. Tests updated. Not tested yet.
538c1110 -
Charlie Jacobsen authored
Motivation: In some cases, we need to split the sending of the request from the receipt of the response. For example, in LCDs, we need to send an async request, then do a *microkernel sync send*, and then get the async response.
8e865fc2 -
Charlie Jacobsen authored
This is when the libasync user knows there will never be a response for a particular request, and they would like to free up the cookie.
a3dda13e -
Michael Quigley authored9ad11563
-
Charlie Jacobsen authored
Inits list head, etc.
e5fbd42e -
Charles Jacobsen authored27567ae2
-
Charles Jacobsen authored12bdeb4f
-
Michael Quigley authorede5ef903e
-
Charles Jacobsen authored
Motivation: thc is cooperative, but there are still cases where we can get into trouble. In thc_poll_recv, it's possible that the awe we switch to (to receive a response) wants to kill the channel that we just polled on. In the original implementation, after we scheduled that awe, we would eventually come back into thc_poll_recv, go to the top of the loop, and try to receive again; but instead, we should just abort (and in fact, we would be using memory after it had been freed). When a channel group item is created (with thc_channel_group_item_init), its state = LIVE, and its ref count is 1. So, the creating awe automatically gets a reference. When another awe wants to grab a reference, it should call thc_channel_group_item_inc_ref; and to release a reference, thc_channel_group_item_dec_ref. dec ref will remove the channel group item from its group and free it when the ref count reaches 0. To signal to other awe's (thc async threads) that a channel is dead, you should call thc_channel_group_item_mark_dead.
8e602ced -
Charles Jacobsen authored5903d68d
-
Charlie Jacobsen authored
I realized we need to be doing the state checking in some of the other ipc functions (perhaps indirectly, e.g. thc_ipc_call). And then it seemed to make more sense to create a new data type - a thc channel that wraps a fipc channel with extras that we need when doing async stuff. So, we still do ref counting, but it's on the thc_channel. I no longer free the thc_channel when the ref drops. Leave up to the libasync user to decide. I updated the interface so that e.g. thc_ipc_recv now takes a struct thc_channel instead.
3e525b06 -
Charles Jacobsen authored30e6c689
-
Charles Jacobsen authored
Including exports. Not sure what happened.
defbf28b -
Michael Quigley authoredf7f39703
-
4b4199b8
-
Michael Quigley authored5f0da927
-
Michael Quigley authoredbd301dee
-
Michael Quigley authored4d1109a1
-
Charles Jacobsen authoredf7e93054
-
Charles Jacobsen authoredb3789f7a
-
Charlie Jacobsen authored
-- thc_ipc_send ==> thc_ipc_send_request -- thc_ipc_recv ==> thc_ipc_recv_response -- thc_ipc_recv_response ignores requests and messages that are neither requests or responses (i.e., it only handles responses). See updated header documentation. -- awe_mapper_create_id and awe_mapper_get_id no longer BUG on error conditions; they return a non-zero exit status instead. -- THCYieldToId and THCYieldToIdAndSave return non-zero if the id does not match an awe. Not built or tested yet. Updated examples. (In the context switch example, I just BUG on in there, so you have the same semantics as before.)
585e4dfd -
Charles Jacobsen authoredf173e637
-
Charlie Jacobsen authored
See THCAbort, THCStopAllAwes, THCShouldStop. Like kthread_stop in the Linux kernel, stopping is voluntary. Add abort example. Not built or tested yet.
a72792f9 -
Charles Jacobsen authored
Phew ... Lots of debugging. This is the commit in which I discovered AC/THC fails when it uses %rsp offsets instead of %rbp offsets. And that we need to be careful with local variables inside ASYNCs. Anyway, this commit does the following: -- You can build for LAZY/EAGER using a configure flag: --enable-eager By default, it builds for lazy. -- Fix abort example to yield async 0. The print out result is quite interesting. -- Fix caller to use alloca, just to be paranoid about passing the local variable transaction_id. This is probably not necessary in this example, but it demonstrates the care required to pass locals in async's.
5f36629f -
Charles Jacobsen authored
This will not work unless you implement thc_dump_stack_0 and thc_link_to_frame_0 for your architecture. Moreover, the implementation of thc_dump_stack_0 should continue walking the stack until it hits either a null frame or return address. (The usual way is to assume stacks are aligned at certain addresses and to stop the walking when you reach that alignment. That WILL NOT work here.)
2600bee1 -
Charles Jacobsen authored
The address returned from kmalloc is the *bottom* of the stack, but the pointers in pts->free_stacks are (almost) the top of the stack.
a854f236 -
Vikram Narayanan authored
For all the callbacks registered with the kernel, the invocation can be from a kernel thread, user thread or from KLCD itself. If it's from KLCD, there is nothing that needs to be setup. If it's from a non LCD context, we need to setup the runtime everytime. For now, grant the sync endpoint and don't delete the cptr, because we don't exactly know when the process would exit. Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
ec3d34f0 -
Vikram Narayanan authored
Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
88298d8b -
Vikram Narayanan authored
Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
333a4042 -
Vikram Narayanan authored
Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
cae645ee -
Vikram Narayanan authored
Also add optimized poll_recv_group helpers Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
d62d9e21 -
Vikram Narayanan authored
Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
89134d84 -
Vikram Narayanan authored
Sender side dispatch helps to eliminate klcd in occupying a core. Instead of sending requests to KLCD, we poll the channel in the syscall context to invoke the callee function requested by lcd. Signed-off-by:
Vikram Narayanan <vikram186@gmail.com>
15c2e6fe -
Vikram Narayanan authored71b5568b
-
Vikram Narayanan authored
Fix typecasting,assert bugs in awe_mapper Signed-off-by:
Vikram Narayanan <vikram186@gmail.com> Conflicts: src/common/awe_mapper.c src/include/awe_mapper.h src/tests/ctx-switch/main.c
ad82feb5 -
Vikram Narayanan authored
Also update the branch on .gitmodules
02123f67
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
src/tests/abort/Kbuild.in
0 → 100644
src/tests/abort/main.c
0 → 100644