Hi Walt,
I have been away from email since Wednesday of last week so I am just
now catching up- but I may as well jump in on this question.
Would the job_null() function do what you want? It never immediately
completes, and doesn't actually do any work. It is just a way to
trigger a transition in a state machine (which may be a different state
machine from the one that actually called job_null()- you just have to
set the user_ptr appropriately). This was something I added a while
back as a mechanism to trigger transitions across cobbled together
parallel machines.
The only difference from what you describe is that there is no release
phase- just a post. You could possibly use it to trigger a transition
to a state that has a counter in it though (if count < n, transition to
myself, otherwise go to next state) in order to add an arbitrary number
of conditions that need to be triggered before the "real" transition.
If you really need the post/release model (and don't want to add
complexity to the states), then you might still want to look at job_null
as a starting point- just split it into two functions. The post would
just allocate a job descriptor and set some counter in it of how many
releases are needed before it completes. The second function would be a
release function that decrements the counter and then moves it to the
completion queue when it hits zero.
If you do the above approach, you just need to update the one occurence
of job_null() in the current cvs tree to do a post immediately followed
by a release. Or maybe if the post function takes an argument to tell
it how many releases are needed and you can just pass in 0 to get the
old behavior.
At any rate, I think the functionality that you need can all be done at
the job level without adding much code.
-Phil
Walter B. Ligon III wrote:
I need a crash course in the job interface.
I need to add something a lot like the scheduler but without any
intelligence. Basically I'd like a SM to be able to post a job which
will never have immediate completion. Then later another SM posts a
release that lets the first job go. It looks like the stuff that
already exists for the scheduler is pretty close to what I want, except
I don't want any of the scheduler bits. What isn't clear to me is how a
job moves to the completed list, or how I can maintain a list of waiting
jobs and look those up. It appears some of that is going on in the
calls in job.c but I don't know what's being done by the job layer and
what is being done by the scheduler.
If someone who knows this stuff can email me so I can get a few
questions answered then I can forge ahead myself.
Thanks!
Walt
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers