scheduling co-processors
Hi,
I have a dual-core system on which I would like to treat one processor as a scheduling co-processor. I have already implemented some custom scheduling policies and tested them with SMP disabled, I would not like to see if it is possible to have the scheduling algorithm running on one core and the scheduled tasks running on another.
I do not know if I can somehow use cpus_allowed to restrict the kernel to one core and the running tasks to another. Is this possible? If so, could you please inform me how one would go about this?
In case you are wondering why I would need this, I am writing a bunch of high-overhead distributed scheduling algorithms and I want to mitigate their overhead in this way.
Thanks.
Quoted 10 lines · Sherif Fadel
Hi,
I have a dual-core system on which I would like to treat one processor as a scheduling co-processor. I have already implemented some custom scheduling policies and tested them with SMP disabled, I would not like to see if it is possible to have the scheduling algorithm running on one core and the scheduled tasks running on another.
I do not know if I can somehow use
cpus_allowedto restrict the kernel to one core and the running tasks to another. Is this possible?
You'd have to hot-unplug the cpus to stop them from being used.
Quoted 2 lines
If so,
could you please inform me how one would go about this?
Write code ;-), mind you that running stuff on a cpu without the scheduler present won't allow you to run regular linux stuff.
Quoted 3 lines
In case you are wondering why I would need this, I am writing a bunch of high-overhead distributed scheduling algorithms and I want to mitigate their overhead in this way.
Seems unlikely to work imho, most of the overhead is remote accesses and by moving everything to one cpu you'll incur those costs all the time.
Quoted 8 lines · Sherif Fadel
Hi,
I have a dual-core system on which I would like to treat one processor as a scheduling co-processor. I have already implemented some custom scheduling policies and tested them with SMP disabled, I would not like to see if it is possible to have the scheduling algorithm running on one core and the scheduled tasks running on another.
Quoted 4 lines
I do not know if I can somehow use
cpus_allowedto restrict the kernel to one core and the running tasks to another. Is this possible? If so, could you please inform me how one would go about this?
You can look at cpu affinity and see if it does some of what you want.
Quoted 6 lines
In case you are wondering why I would need this, I am writing a bunch of high-overhead distributed scheduling algorithms and I want to mitigate their overhead in this way.
Thanks.
Signature · 3 lines
Bill Davidsen <[email protected]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot
Quoted 12 lines · Sherif Fadel
Hi,
I have a dual-core system on which I would like to treat one processor as a scheduling co-processor. I have already implemented some custom scheduling policies and tested them with SMP disabled, I would not like to see if it is possible to have the scheduling algorithm running on one core and the scheduled tasks running on another.
I do not know if I can somehow use
cpus_allowedto restrict the kernel to one core and the running tasks to another. Is this possible? If so, could you please inform me how one would go about this?
Quoted 6 lines
In case you are wondering why I would need this, I am writing a bunch of high-overhead distributed scheduling algorithms and I want to mitigate their overhead in this way.
Thanks.
The design I would have for this would be to have a kthread that does whatever busy work your scheduler has as a separate process. You could then replace the existing scheduler with a sort of "schedulerlet" that would simply schedule according to directions queued up for it by the kthread task. From there cpu affinity should get you the "dedicated scheduler processor" you want.
I can't even begin to envision the scheduling algorithm that would be able to operate this way, but I have to assume that if it makes sense for your scheduler to run on another CPU then it must be able to fit into this pattern.
--CJD
Quoted 42 lines
-----Original Message-----
From: [email protected] [mailto:linux-kernel- [email protected]] On Behalf Of Casey Dahlin
Sent: Monday, August 03, 2009 11:28 PM
To: Sherif Fadel
Cc: [email protected]
Subject: Re: scheduling co-processorsQuoted 3 lines · Sherif Fadel
Hi,
I have a dual-core system on which I would like to treat one
processor
Quoted 2 lines
as a scheduling co-processor. I have already implemented some custom scheduling policies and tested them with SMP disabled, I would not
like
Quoted 1 line
to see if it is possible to have the scheduling algorithm running on
one
Quoted 3 lines
core and the scheduled tasks running on another.
I do not know if I can somehow use
cpus_allowedto restrict thekernel
Quoted 1 line
to one core and the running tasks to another. Is this possible? If
so,
Quoted 3 lines
could you please inform me how one would go about this?
In case you are wondering why I would need this, I am writing a bunch
of
Quoted 1 line
high-overhead distributed scheduling algorithms and I want to
mitigate
Quoted 4 lines
their overhead in this way.
Thanks.
The design I would have for this would be to have a kthread that does whatever busy work your scheduler has as a separate process. You could then replace the existing scheduler with a sort of "schedulerlet" that would simply schedule according to directions queued up for it by the kthread task. From there cpu affinity should get you the "dedicated scheduler processor" you want.
Quoted 4 lines
I can't even begin to envision the scheduling algorithm that would be able to operate this way, but I have to assume that if it makes sense for your scheduler to run on another CPU then it must be able to fit into this pattern.
Thanks for the info. I think that this will do perfectly.
Quoted 8 lines
--CJD
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/