Peter Williams wrote:
I'm in the process of merging the PlugSched patches with your latest CKRM patches for 2.6.10 and I have a question regarding one of your macros which I believe may not be doing what it's name implies:
#define task_is_running(p) (this_rq() == task_rq(p))
I.e. the name implies that the macro returns true if task p is running BUT it will actually return true if task p is assigned to the same cpu as the currently running task regardless of whether p is running (i.e. on a run queue) or not.
Is that what was intended?
The name does appear confusing though its usage in the CKRM scheduler patch results in the correct result because the macro gets invoked only during a code path in which the task state is confirmed to be TASK_RUNNING.
What's the point of it then? Are you really testing that the task p is allocated to the same CPU as the current task? Because that's all this macro will tell you?
Haoqiang, was the macro intended to be used elsewhere ?
It's only defined in sched.c and used only once but the name of the function from which it is invoked also implies that you're expecting it to do something different to what it does.
You still haven't convinced me that this is not an error :-(
Peter -- Peter Williams [EMAIL PROTECTED]
"Learning, n. The kind of ignorance distinguishing the studious." -- Ambrose Bierce
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech
