* scheduling co-processors
@ 2009-08-03 15:08 Sherif Fadel
2009-08-03 15:59 ` Peter Zijlstra
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sherif Fadel @ 2009-08-03 15:08 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scheduling co-processors
2009-08-03 15:08 scheduling co-processors Sherif Fadel
@ 2009-08-03 15:59 ` Peter Zijlstra
2009-08-03 19:52 ` Bill Davidsen
2009-08-03 20:28 ` Casey Dahlin
2 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2009-08-03 15:59 UTC (permalink / raw)
To: Sherif Fadel; +Cc: linux-kernel
On Mon, 2009-08-03 at 18:08 +0300, Sherif Fadel wrote:
> 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?
You'd have to hot-unplug the cpus to stop them from being used.
> 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.
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scheduling co-processors
2009-08-03 15:08 scheduling co-processors Sherif Fadel
2009-08-03 15:59 ` Peter Zijlstra
@ 2009-08-03 19:52 ` Bill Davidsen
2009-08-03 20:28 ` Casey Dahlin
2 siblings, 0 replies; 5+ messages in thread
From: Bill Davidsen @ 2009-08-03 19:52 UTC (permalink / raw)
To: Sherif Fadel; +Cc: linux-kernel
Sherif Fadel wrote:
> 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?
>
You can look at cpu affinity and see if it does some of what you want.
> 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.
>
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scheduling co-processors
2009-08-03 15:08 scheduling co-processors Sherif Fadel
2009-08-03 15:59 ` Peter Zijlstra
2009-08-03 19:52 ` Bill Davidsen
@ 2009-08-03 20:28 ` Casey Dahlin
2009-08-04 10:28 ` Sherif F. Fahmy
2 siblings, 1 reply; 5+ messages in thread
From: Casey Dahlin @ 2009-08-03 20:28 UTC (permalink / raw)
To: Sherif Fadel; +Cc: linux-kernel
On 08/03/2009 11:08 AM, Sherif Fadel wrote:
> 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.
>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: scheduling co-processors
2009-08-03 20:28 ` Casey Dahlin
@ 2009-08-04 10:28 ` Sherif F. Fahmy
0 siblings, 0 replies; 5+ messages in thread
From: Sherif F. Fahmy @ 2009-08-04 10:28 UTC (permalink / raw)
To: 'Casey Dahlin'; +Cc: linux-kernel
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Casey Dahlin
> Sent: Monday, August 03, 2009 11:28 PM
> To: Sherif Fadel
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: scheduling co-processors
>
> On 08/03/2009 11:08 AM, Sherif Fadel wrote:
> > 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.
> >
>
> 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.
Thanks for the info. I think that this will do perfectly.
>
> --CJD
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-04 10:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 15:08 scheduling co-processors Sherif Fadel
2009-08-03 15:59 ` Peter Zijlstra
2009-08-03 19:52 ` Bill Davidsen
2009-08-03 20:28 ` Casey Dahlin
2009-08-04 10:28 ` Sherif F. Fahmy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox