Skip to contentSkip to conversation

Trying out SCHED_BATCH

DISCUSSION Rajsekar 8 participants 15 messages Dec 25, 2004 – Jan 2, 2005

lore
Share & tools
lore

Rajsekar

author
#0 lore raw

I would like to try out the SCHED_BATCH. Unfortunately, I am not able to find a patch for my kernel. Could someone enlighten me on this?

I am running 2.6.10-rc1-mm2 with staircase scheduler patch. My `uname -a' output is:

Linux rajsekar.pc 2.6.10-rc1-mm2staircase #2 Sat Dec 4 10:49:31 IST 2004 i686 AuthenticAMD unknown GNU/Linux

Signature · 1 line
    Rajsekar
#1 lore raw
Quoted 8 lines · Rajsekar

I would like to try out the SCHED_BATCH. Unfortunately, I am not able to find a patch for my kernel. Could someone enlighten me on this?

I am running 2.6.10-rc1-mm2 with staircase scheduler patch. My `uname -a' output is:

Linux rajsekar.pc 2.6.10-rc1-mm2staircase #2 Sat Dec 4 10:49:31 IST 2004 i686 AuthenticAMD unknown GNU/Linux

Only the staircase scheduler currently has an implementation of sched_batch and you need 2 more patches on top of the staircase patch for it to work. The most current version for 2.6.10 you can get with this patch sequence from the latest -ck patchset (or you could just use the full -ck patch)

http://ck.kolivas.org/patches/2.6/2.6.10/2.6.10-ck1/patches/

2.6.10_to_staircase9.2.diff
schedrange.diff
schedbatch2.6.diff

Cheers,
Con

#2 lore raw

Hi

Quoted 3 lines · Con

Only the staircase scheduler currently has an implementation of sched_batch and you need 2 more patches on top of the staircase patch for it to work.

Hmm, Is it feasable to write a sched_batch policy for the current linux schedulers?

I mean, if there are people that want it bad, maybe it would be nice to be able to use a version of sched_batch that would work without the staircase scheduler. It is still experimental, right?

Regards,
Maciej

#3 lore raw
Quoted 9 lines · Maciej Soltysiak

Hi

Quoted 3 lines · Con

Only the staircase scheduler currently has an implementation of sched_batch and you need 2 more patches on top of the staircase patch for it to work.

Hmm, Is it feasable to write a sched_batch policy for the current linux schedulers?

Yes.

The proper way to make a sched_batch implementation is more comprehensive than what is made for staircase to prevent a deadlock based on a batch task getting an important lock in the kernel and not being able to release it due to a sched_normal task being higher priority than it that is actually trying to get the lock. There is code in the staircase version to prevent this from happening but probably not complete enough in design to prevent everything. However it works and I haven't had any reports of lockups since I implemented the extra checking.

Would you like me to create a version like that? I don't have the time to try and make a more comprehensive solution and follow the debugging of such a beast.

Quoted 5 lines

I mean, if there are people that want it bad, maybe it would be nice to be able
to use a version of sched_batch that would work without the staircase scheduler.
It is still experimental, right?

No it's not experimental. It is very stable and used in production systems.

Con

#4 lore raw
Quoted 27 lines · Con Kolivas
Quoted 10 lines · Maciej Soltysiak

Hi

Quoted 3 lines · Con

Only the staircase scheduler currently has an implementation of sched_batch and you need 2 more patches on top of the staircase patch for it to work.

Hmm, Is it feasable to write a sched_batch policy for the current linux schedulers?

Yes.

The proper way to make a sched_batch implementation is more comprehensive than what is made for staircase to prevent a deadlock based on a batch task getting an important lock in the kernel and not being able to release it due to a sched_normal task being higher priority than it that is actually trying to get the lock. There is code in the staircase version to prevent this from happening but probably not complete enough in design to prevent everything. However it works and I haven't had any reports of lockups since I implemented the extra checking.

Would you like me to create a version like that? I don't have the time to try and make a more comprehensive solution and follow the debugging of such a beast.

Quoted 7 lines
Quoted 5 lines

I mean, if there are people that want it bad, maybe it would be nice to be able
to use a version of sched_batch that would work without the staircase scheduler.
It is still experimental, right?

No it's not experimental. It is very stable and used in production systems.

Are you gointo to push to Linus/Andrew ?

Signature · 1 line
Paolo
#5 lore raw
Quoted 38 lines · Paolo Ciarrocchi
Quoted 36 lines · Con Kolivas
Quoted 11 lines · Maciej Soltysiak

Hi

Quoted 3 lines · Con

Only the staircase scheduler currently has an implementation of sched_batch and you need 2 more patches on top of the staircase patch for it to work.

Hmm, Is it feasable to write a sched_batch policy for the current linux schedulers?

Yes.

The proper way to make a sched_batch implementation is more comprehensive than what is made for staircase to prevent a deadlock based on a batch task getting an important lock in the kernel and not being able to release it due to a sched_normal task being higher priority than it that is actually trying to get the lock. There is code in the staircase version to prevent this from happening but probably not complete enough in design to prevent everything. However it works and I haven't had any reports of lockups since I implemented the extra checking.

Would you like me to create a version like that? I don't have the time to try and make a more comprehensive solution and follow the debugging of such a beast.

Quoted 5 lines

I mean, if there are people that want it bad, maybe it would be nice to be able
to use a version of sched_batch that would work without the staircase scheduler.
It is still experimental, right?

Quoted 4 lines
Quoted 1 line

No it's not experimental. It is very stable and used in production systems.

Are you gointo to push to Linus/Andrew ?

Staircase? I'm still in pain from the last time I tried to push it in a more palatable form via the plugsched architecture which took me a long time to do. I don't have the fortitude to go through that again in a hurry.

Cheers,
Con

#6 lore raw
Quoted 6 lines · Con Kolivas
Quoted 1 line · Paolo Ciarrocchi

Are you gointo to push to Linus/Andrew ?

Staircase? I'm still in pain from the last time I tried to push it in a more palatable form via the plugsched architecture which took me a long time to do. I don't have the fortitude to go through that again in a hurry.

Yup, I remember your tentative.

Andrew,
what's your plan for the staircase scheduler ?

Signature · 1 line
Paolo
#7 lore raw
Quoted 3 lines · Paolo Ciarrocchi

Andrew,
what's your plan for the staircase scheduler ?

I have none, frankly. I haven't seen any complaints about the current scheduler.

If someone can identify bad behaviour in the current scheduler which staircase improves then please describe a tescase which the scheduler developers can use to reproduce the situation.

If, after that, we deem that the problem cannot be feasibly fixed within the context of the current scheduler and that the problem is sufficiently serious to justify wholesale replacement of the scheduler then sure, staircase is an option.

#8 lore raw
Quoted 8 lines · Andrew Morton
Quoted 3 lines · Paolo Ciarrocchi

Andrew,
what's your plan for the staircase scheduler ?

I have none, frankly. I haven't seen any complaints about the current scheduler.

Quoted 8 lines

If someone can identify bad behaviour in the current scheduler which staircase improves then please describe a tescase which the scheduler developers can use to reproduce the situation.

If, after that, we deem that the problem cannot be feasibly fixed within the context of the current scheduler and that the problem is sufficiently serious to justify wholesale replacement of the scheduler then sure, staircase is an option.

Your answer makes lot of sense.
I think Con can explain the pro and cons of the staircase scheduler.

Best,

Signature · 1 line
Paolo
#9 lore raw
Quoted 14 lines · Paolo Ciarrocchi
Quoted 12 lines · Andrew Morton
Quoted 2 lines · Paolo Ciarrocchi

Andrew,
what's your plan for the staircase scheduler ?

I have none, frankly. I haven't seen any complaints about the current scheduler.

If someone can identify bad behaviour in the current scheduler which staircase improves then please describe a tescase which the scheduler developers can use to reproduce the situation.

Quoted 8 lines
Quoted 4 lines

If, after that, we deem that the problem cannot be feasibly fixed within the context of the current scheduler and that the problem is sufficiently serious to justify wholesale replacement of the scheduler then sure, staircase is an option.

Your answer makes lot of sense.
I think Con can explain the pro and cons of the staircase scheduler.

I agree fully with Andrew. I'm not going there while we have 2.6 forever development.

Cheers,
Con

#10 lore raw
In reply to Andrew Morton
Quoted 11 lines · Andrew Morton
Quoted 1 line · Paolo Ciarrocchi

Andrew, what's your plan for the staircase scheduler ?

I have none, frankly. I haven't seen any complaints about the current scheduler.

If someone can identify bad behaviour in the current scheduler which staircase improves then please describe a tescase which the scheduler developers can use to reproduce the situation.

Of course that may result in just another band-aid on the current scheduler rather than a change.

Quoted 5 lines

If, after that, we deem that the problem cannot be feasibly fixed within the context of the current scheduler and that the problem is sufficiently serious to justify wholesale replacement of the scheduler then sure, staircase is an option.

More to the point, was there a problem with plugable schedulers? It would be both technically and politically better to let people try, use, and write schedulers for special case loads, just as we have for io scheduling.

I didn't find staircase to be the solution to any of my problems, but it would be nice to let all the people who are improving schedulers have an easy way to try new ideas (easier than building a whole new kernel, that is).

Signature · 3 lines
bill davidsen <[email protected]>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979
#11 lore raw
Quoted 25 lines · Bill Davidsen
Quoted 6 lines · Andrew Morton
Quoted 1 line · Paolo Ciarrocchi

Andrew, what's your plan for the staircase scheduler ?

Quoted 6 lines

I have none, frankly. I haven't seen any complaints about the current scheduler.

If someone can identify bad behaviour in the current scheduler which staircase improves then please describe a tescase which the scheduler developers can use to reproduce the situation.

Of course that may result in just another band-aid on the current scheduler rather than a change.

Quoted 5 lines

If, after that, we deem that the problem cannot be feasibly fixed within the context of the current scheduler and that the problem is sufficiently serious to justify wholesale replacement of the scheduler then sure, staircase is an option.

Quoted 4 lines

More to the point, was there a problem with plugable schedulers? It would be both technically and politically better to let people try, use, and write schedulers for special case loads, just as we have for io scheduling.

I didn't find staircase to be the solution to any of my problems, but it would be nice to let all the people who are improving schedulers have an easy way to try new ideas (easier than building a whole new kernel, that is).

At Con's request I've taken over responsibility for plugsched but I've been away visiting relatives for the last week or so and, therefore, I'm a little behind. I hope to release a plugsched patch for 2.6.10 in the next few days with a (work in progress) modification to share a lot more code between schedulers so that the amount of work required to implement new schedulers is reduced.

Peter

Signature · 4 lines
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
#12 lore raw
In reply to Rajsekar
Quoted 8 lines · Rajsekar

I would like to try out the SCHED_BATCH. Unfortunately, I am not able to find a patch for my kernel. Could someone enlighten me on this?

I am running 2.6.10-rc1-mm2 with staircase scheduler patch. My `uname -a' output is:

Linux rajsekar.pc 2.6.10-rc1-mm2staircase #2 Sat Dec 4 10:49:31 IST 2004 i686 AuthenticAMD unknown GNU/Linux

2.6.10-ck1 can be found here (It has SCHED_BATCH):

http://members.optusnet.com.au/ckolivas/kernel/

Signature · 5 lines
[Name      ]   ::  [Matan I. Peled    ]
[Location  ]   ::  [Israel            ]
[Public Key]   ::  [0xD6F42CA5        ]
[Keyserver ]   ::  [keyserver.kjsl.com]
encrypted/signed  plaintext   preffered
#13 lore raw
In reply to Rajsekar
Quoted 8 lines · Rajsekar

I would like to try out the SCHED_BATCH. Unfortunately, I am not able to find a patch for my kernel. Could someone enlighten me on this?

I am running 2.6.10-rc1-mm2 with staircase scheduler patch. My `uname -a' output is:

Linux rajsekar.pc 2.6.10-rc1-mm2staircase #2 Sat Dec 4 10:49:31 IST 2004 i686 AuthenticAMD unknown GNU/Linux

See the announcement of 2.6.10-ck1, that has what you want. However, you want to read the whole thread, as there is one patch WRT swap_token which you may want to revert.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979
#14 lore raw
Quoted 5 lines · Bill Davidsen
Quoted 3 lines · Rajsekar

I would like to try out the SCHED_BATCH. Unfortunately, I am not able to find a patch for my kernel. Could someone enlighten me on this?

Quoted 7 lines
Quoted 6 lines

I am running 2.6.10-rc1-mm2 with staircase scheduler patch. My `uname -a'
output is:

Linux rajsekar.pc 2.6.10-rc1-mm2staircase #2 Sat Dec 4 10:49:31 IST 2004 i686 AuthenticAMD unknown GNU/Linux

See the announcement of 2.6.10-ck1, that has what you want. However, you want to read the whole thread, as there is one patch WRT swap_token which you may want to revert.

That patch is harmless so there is no need to revert it.

Cheers,
Con