DragonFly kernel List (threaded) for 2010-06
Re: HEADS UP - major structure size changes in HEAD (template available)
I have committed my first attempt in
Basically the rules I followed were:
* Add (MPSAFE) in the comment at the top of the file, so each
individual routine does not have to be tagged MPSAFE.
* Cleaned up the comments on each routine and added comments
indicating requirements (kinda optional but I was being careful).
* Nearly all global procedures acquire and release the vm_token,
while nearly all static procedures assume the vm_token is being
held by the caller.
The whole mess should be safe until we get the entire system locked up
this way, because these tokens are only held along with the MP lock
so by definition since the MP lock is already held (since we haven't
removed it yet), all our token calls will be non-blocking until we are
ready to remove the MP lock.
This way non-blocking assumptions between major subsystems remain intact
until we can do another pass to locate and deal with them. We can do
an entire first-pass on all system files, acquiring and releasing the
necessary tokens, without destabilizing master.
I need volunteers to make the same adjustments to the other three
architectural pmap.c files. Any takers? It takes about 2 hours to
do one file.
System sources that need to be locked up with vm_token (for now):
Even though we will eventually go to more fine-grained locks I think
we really want to get the whole system converted to coarse-grained tokens
first, make sure it is all stable, remove the MP lock, and then continue
on from there.