Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 12/03/2013 05:41 PM, Steven Rostedt wrote: > On Tue, 03 Dec 2013 17:13:44 +0100 > Juri Lelli wrote: > >> On 11/30/2013 03:06 PM, Ingo Molnar wrote: >>> >>> * Peter Zijlstra wrote: >>> On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: > +SYSCALL_DEFINE2(sched_getattr,

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Steven Rostedt
On Tue, 03 Dec 2013 17:13:44 +0100 Juri Lelli wrote: > On 11/30/2013 03:06 PM, Ingo Molnar wrote: > > > > * Peter Zijlstra wrote: > > > >> On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: > >>> +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, > >>> attr) >

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 11/30/2013 03:06 PM, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: >>> +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, >>> attr) >>> { >>> - struct sched_param2 lp; >>> + struct sched_attr lp; >>>

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 11/30/2013 03:06 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, attr) { - struct sched_param2 lp; + struct sched_attr lp;

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Steven Rostedt
On Tue, 03 Dec 2013 17:13:44 +0100 Juri Lelli juri.le...@gmail.com wrote: On 11/30/2013 03:06 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-12-03 Thread Juri Lelli
On 12/03/2013 05:41 PM, Steven Rostedt wrote: On Tue, 03 Dec 2013 17:13:44 +0100 Juri Lelli juri.le...@gmail.com wrote: On 11/30/2013 03:06 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote:

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-30 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: > > +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, > > attr) > > { > > - struct sched_param2 lp; > > + struct sched_attr lp; > > struct task_struct *p; > > int retval; >

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-30 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, attr) { - struct sched_param2 lp; + struct sched_attr lp; struct task_struct *p; int

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-28 Thread Peter Zijlstra
On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: > +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, attr) > { > - struct sched_param2 lp; > + struct sched_attr lp; > struct task_struct *p; > int retval; > > - if (!param2 || pid < 0) > +

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-28 Thread Juri Lelli
On 11/27/2013 03:17 PM, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > >> On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: So the problem I see with this one is that because you're allowed to call sched_setparam() or whatever it will be called next on another

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-28 Thread Juri Lelli
On 11/27/2013 03:17 PM, Ingo Molnar wrote: * Peter Zijlstra pet...@infradead.org wrote: On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: So the problem I see with this one is that because you're allowed to call sched_setparam() or whatever it will be called next on another

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-28 Thread Peter Zijlstra
On Thu, Nov 28, 2013 at 12:14:03PM +0100, Juri Lelli wrote: +SYSCALL_DEFINE2(sched_getattr, pid_t, pid, struct sched_attr __user *, attr) { - struct sched_param2 lp; + struct sched_attr lp; struct task_struct *p; int retval; - if (!param2 || pid 0) + if

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: > > > So the problem I see with this one is that because you're allowed to > > > call sched_setparam() or whatever it will be called next on another > > > task; a task can very easily fail its

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Peter Zijlstra
On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: > > So the problem I see with this one is that because you're allowed to > > call sched_setparam() or whatever it will be called next on another > > task; a task can very easily fail its sched_getparam() call. > > > > Suppose the

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, Nov 27, 2013 at 02:23:54PM +0100, Ingo Molnar wrote: > > There are 3 main compatibility cases: > > > > - the kernel's 'sizeof sched_attr' is equal to sched_attr:size: the > >kernel version and user-space version matches, it's a straight ABI > >in

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Peter Zijlstra
On Wed, Nov 27, 2013 at 02:23:54PM +0100, Ingo Molnar wrote: > There are 3 main compatibility cases: > > - the kernel's 'sizeof sched_attr' is equal to sched_attr:size: the >kernel version and user-space version matches, it's a straight ABI >in this case with full functionality. > >

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Juri Lelli wrote: > + * @__unused padding to allow future expansion without ABI issues > + */ > +struct sched_param2 { > + int sched_priority; > + unsigned int sched_flags; > + u64 sched_runtime; > + u64 sched_deadline; > + u64 sched_period; > + > + u64

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Juri Lelli juri.le...@gmail.com wrote: + * @__unused padding to allow future expansion without ABI issues + */ +struct sched_param2 { + int sched_priority; + unsigned int sched_flags; + u64 sched_runtime; + u64 sched_deadline; + u64 sched_period; + +

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Peter Zijlstra
On Wed, Nov 27, 2013 at 02:23:54PM +0100, Ingo Molnar wrote: There are 3 main compatibility cases: - the kernel's 'sizeof sched_attr' is equal to sched_attr:size: the kernel version and user-space version matches, it's a straight ABI in this case with full functionality. - the

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Wed, Nov 27, 2013 at 02:23:54PM +0100, Ingo Molnar wrote: There are 3 main compatibility cases: - the kernel's 'sizeof sched_attr' is equal to sched_attr:size: the kernel version and user-space version matches, it's a straight ABI

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Peter Zijlstra
On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: So the problem I see with this one is that because you're allowed to call sched_setparam() or whatever it will be called next on another task; a task can very easily fail its sched_getparam() call. Suppose the application is

Re: [PATCH 02/14] sched: add extended scheduling interface. (new ABI)

2013-11-27 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Wed, Nov 27, 2013 at 03:01:43PM +0100, Ingo Molnar wrote: So the problem I see with this one is that because you're allowed to call sched_setparam() or whatever it will be called next on another task; a task can very easily fail its

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:32 PM, Steven Rostedt wrote: > On Thu, 7 Nov 2013 14:43:36 +0100 > Juri Lelli wrote: > > >> +static int >> +do_sched_setscheduler2(pid_t pid, int policy, >> + struct sched_param2 __user *param2) >> +{ >> +struct sched_param2 lparam2; >> +struct

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:23 PM, Steven Rostedt wrote: > On Thu, 7 Nov 2013 14:43:36 +0100 > Juri Lelli wrote: > > >> + * This is reflected by the actual fields of the sched_param2 structure: >> + * >> + * @sched_priority task's priority (might still be useful) >> + * @sched_deadline

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:23 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: + * This is reflected by the actual fields of the sched_param2 structure: + * + * @sched_priority task's priority (might still be useful) + * @sched_deadline

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-13 Thread Juri Lelli
On 11/12/2013 06:32 PM, Steven Rostedt wrote: On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: +static int +do_sched_setscheduler2(pid_t pid, int policy, + struct sched_param2 __user *param2) +{ +struct sched_param2 lparam2; +

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-12 Thread Steven Rostedt
On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli wrote: > +static int > +do_sched_setscheduler2(pid_t pid, int policy, > + struct sched_param2 __user *param2) > +{ > + struct sched_param2 lparam2; > + struct task_struct *p; > + int retval; > + > + if (!param2

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-12 Thread Steven Rostedt
On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli wrote: > + * This is reflected by the actual fields of the sched_param2 structure: > + * > + * @sched_priority task's priority (might still be useful) > + * @sched_deadline representative of the task's deadline > + * @sched_runtime

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-12 Thread Steven Rostedt
On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: + * This is reflected by the actual fields of the sched_param2 structure: + * + * @sched_priority task's priority (might still be useful) + * @sched_deadline representative of the task's deadline + *

Re: [PATCH 02/14] sched: add extended scheduling interface.

2013-11-12 Thread Steven Rostedt
On Thu, 7 Nov 2013 14:43:36 +0100 Juri Lelli juri.le...@gmail.com wrote: +static int +do_sched_setscheduler2(pid_t pid, int policy, + struct sched_param2 __user *param2) +{ + struct sched_param2 lparam2; + struct task_struct *p; + int retval; + +

[PATCH 02/14] sched: add extended scheduling interface.

2013-11-07 Thread Juri Lelli
From: Dario Faggioli Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is scheduled according to

[PATCH 02/14] sched: add extended scheduling interface.

2013-11-07 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is

[PATCH 02/14] sched: add extended scheduling interface.

2013-10-14 Thread Juri Lelli
From: Dario Faggioli Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is scheduled according to

[PATCH 02/14] sched: add extended scheduling interface.

2013-10-14 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is

[PATCH 02/14] sched: add extended scheduling interface.

2013-02-11 Thread Juri Lelli
From: Dario Faggioli Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is scheduled according to

[PATCH 02/14] sched: add extended scheduling interface.

2013-02-11 Thread Juri Lelli
From: Dario Faggioli raist...@linux.it Add the interface bits needed for supporting scheduling algorithms with extended parameters (e.g., SCHED_DEADLINE). In general, it makes possible to specify a periodic/sporadic task, that executes for a given amount of runtime at each instance, and is