Skip to contentSkip to conversation

US/KS performance question

DISCUSSION john moser 1 participant 1 message Feb 5, 2004

lore
Share & tools
lore

john moser

author
#0 lore raw

CC me all replies.

I'm doing a little work on ACLs. Instead of a LSM, I'm writing up a little bit of code and some hooks to allow a userspace daemon to do the decision making.

The plan is as follows:

- acld connects to kernel, sleeps.
- Kernel needs to ask something of acld, ques request in US
- Kernel wakes acld up
- Kernel puts the requesting thread to sleep
- acld processes requests
- Each request processed is followed by a syscall to the kernel with the result
- Kernel takes the result, finds the thread that wanted it, wakes thread up
- When there's no more requests, acld sleeps

Now, I have two major bottlenecks:
- Userspace acld MAC daemon has to make a syscall and pass data from US to KS
- Kernel has to sometimes wake up acld and always has to wake up the requesting thread after getting the result back from acld

Any ideas on how much overhead this could add? If it takes only a few more microseconds to wake up acld, sleep the process, process the syscall, and finally wake the process; as opposed to calling a kernel function to make the decision, then it should be okay. If it's going to be some 10 or 20 miliseconds per request, I might have problems. If it's going to take more than 100 mS for this, I need a redesign.

_____________________________________________________________
Linux.Net -->Open Source to everyone
Powered by Linare Corporation
http://www.linare.com/