Re: [PATCH] staircase scheduler v6.4 for 2.6.7-rc3

From: Peter Williams
Date: Tue Jun 08 2004 - 18:57:48 EST


William Lee Irwin III wrote:
On Wed, Jun 09, 2004 at 09:04:23AM +1000, Peter Williams wrote:

There was no need to add the extra overhead of a flag to indicate that a task was queued for scheduling. Testing whether run_list is empty achieves the same thing as reliably as the old array == NULL test did.


Overhead? Doubtful. Also, that requires the use of list_del_init()

Yes, that's true.

while dequeueing, which is not in place now. Please do back the claim
with measurements. It should be easy enough to nop out set_task_queued(),
implement task_queued() via !list_empty(), and clear_task_queued() via
INIT_LIST_HEAD() for a quick performance comparison. But I'd say to
merge it even if there's no difference, as it's more self-contained.


Since the principle use of testing array for NULL or not was to find out if the task was on a run list it seems silly to have a flag to determine this. All it does is provide an opportunity for the flag to not accurately reflect whether the task is really on a list or not.

It caused the number of files touched by the staircase patch to increase by a factor of five which is another good reason to use the alternative.

Peter
--
Dr Peter Williams pwil3058@xxxxxxxxxxxxxx

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/