Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-16 Thread Peter Williams
Jarek Poplawski wrote: On 16-10-2007 03:16, Peter Williams wrote: ... I'd suggest that we modify sched_rr_get_interval() to return -EINVAL (with *interval set to zero) if the target task is not SCHED_RR. That way we can save a lot of unnecessary code. I'll work on a patch. ... I like this i

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-16 Thread Jarek Poplawski
On 16-10-2007 03:16, Peter Williams wrote: ... > > I'd suggest that we modify sched_rr_get_interval() to return -EINVAL > (with *interval set to zero) if the target task is not SCHED_RR. That > way we can save a lot of unnecessary code. I'll work on a patch. ... I like this idea! But, since t

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-15 Thread Peter Williams
Jarek Poplawski wrote: On 13-10-2007 03:29, Peter Williams wrote: Jarek Poplawski wrote: On 12-10-2007 00:23, Peter Williams wrote: ... The reason I was going that route was for modularity (which helps when adding plugsched patches). I'll submit a revised patch for consideration. ... IMHO,

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-15 Thread Jarek Poplawski
On 13-10-2007 03:29, Peter Williams wrote: > Jarek Poplawski wrote: >> On 12-10-2007 00:23, Peter Williams wrote: >> ... >>> The reason I was going that route was for modularity (which helps >>> when adding plugsched patches). I'll submit a revised patch for >>> consideration. >> ... >> >> IMHO,

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-12 Thread Peter Williams
Jarek Poplawski wrote: On 12-10-2007 00:23, Peter Williams wrote: ... The reason I was going that route was for modularity (which helps when adding plugsched patches). I'll submit a revised patch for consideration. ... IMHO, it looks like modularity could suck here: +static unsigned int def

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-12 Thread Ingo Molnar
* Peter Williams <[EMAIL PROTECTED]> wrote: > > I had also considered introducing smth like > > sched_class::task_timeslice() but decided it was not worth it. > > The reason I was going that route was for modularity (which helps when > adding plugsched patches). I'll submit a revised patch fo

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-11 Thread Jarek Poplawski
On 12-10-2007 00:23, Peter Williams wrote: ... > The reason I was going that route was for modularity (which helps when > adding plugsched patches). I'll submit a revised patch for consideration. ... IMHO, it looks like modularity could suck here: > +static unsigned int default_timeslice_fair(s

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-11 Thread Peter Williams
Dmitry Adamushko wrote: On 11/10/2007, Ingo Molnar <[EMAIL PROTECTED]> wrote: * Peter Williams <[EMAIL PROTECTED]> wrote: -#define MIN_TIMESLICEmax(5 * HZ / 1000, 1) -#define DEF_TIMESLICE(100 * HZ / 1000) hm, this got removed by Dmitry quite some time ago. Cou

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-11 Thread Dmitry Adamushko
On 11/10/2007, Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Peter Williams <[EMAIL PROTECTED]> wrote: > > > -#define MIN_TIMESLICEmax(5 * HZ / 1000, 1) > > -#define DEF_TIMESLICE(100 * HZ / 1000) > > hm, this got removed by Dmitry quite some time ago. Could you pleas

Re: [PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-11 Thread Ingo Molnar
* Peter Williams <[EMAIL PROTECTED]> wrote: > -#define MIN_TIMESLICEmax(5 * HZ / 1000, 1) > -#define DEF_TIMESLICE(100 * HZ / 1000) hm, this got removed by Dmitry quite some time ago. Could you please do this patch against the sched-devel git tree: git://git.ke

[PATCH] sched: Rationalize sys_sched_rr_get_interval()

2007-10-10 Thread Peter Williams
At the moment, static_prio_timeslice() is only used in sys_sched_rr_get_interval() and only gives the correct result for SCHED_FIFO and SCHED_RR tasks as the time slice for normal tasks is unrelated to the values returned by static_prio_timeslice(). This patch addresses this problem and in the