Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Mike Galbraith
On Tue, 2014-03-25 at 11:59 -0700, Eric W. Biederman wrote: > So for the general horrible idea. > Nacked-With-Extreme-Prejudice-by: "Eric W. Biederman" Goody. I was surprised Peter didn't make it instantly dead. -Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Khalid Aziz
On 03/25/2014 02:31 PM, ebied...@xmission.com wrote: Yes, it is indeed limited to a cooperating set of userspace tasks/threads. Tasks/threads will explicitly choose to use this feature. It is a no-op for every one else. It is absolutely not a no-op for me if my task can't be scheduled soon enou

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Eric W. Biederman
Khalid Aziz writes: > On 03/25/2014 12:59 PM, ebied...@xmission.com wrote: >> Khalid Aziz writes: >> >>> This patch adds a way for a thread to request additional timeslice from >>> the scheduler if it is about to be preempted, so it could complete any >>> critical task it is in the middle of. ..

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Andi Kleen
On Tue, Mar 25, 2014 at 12:47:52PM -0600, Khalid Aziz wrote: > I am not sure if it would be practical and useful to integrate this > into any of the standard locking interfaces, but I have not looked > into it much either. My initial intent is to let individual apps > decide if they could benefit f

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Khalid Aziz
On 03/25/2014 12:59 PM, ebied...@xmission.com wrote: Khalid Aziz writes: This patch adds a way for a thread to request additional timeslice from the scheduler if it is about to be preempted, so it could complete any critical task it is in the middle of. ... Let me see if I understand th

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Eric W. Biederman
Khalid Aziz writes: > This patch adds a way for a thread to request additional timeslice from > the scheduler if it is about to be preempted, so it could complete any > critical task it is in the middle of. This functionality helps with > performance on databases and has been used for many years

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Khalid Aziz
On 03/25/2014 12:20 PM, Andi Kleen wrote: Khalid Aziz writes: First it would be nice to have some standard reference lock library that uses this. What would it take to support this in glibc? I am not sure if it would be practical and useful to integrate this into any of the standard locking

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Andi Kleen
Khalid Aziz writes: First it would be nice to have some standard reference lock library that uses this. What would it take to support this in glibc? > +== > +Using the preemption delay feature > +== > + > +This feature is enabled in

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Andrew Morton
On Tue, 25 Mar 2014 11:56:31 -0600 Khalid Aziz wrote: > On 03/25/2014 11:44 AM, Andrew Morton wrote: > > So the procfs file is written in binary format and is read back in > > ascii format. Seems odd. > > > > Perhaps this should all be done as a new syscall rather than some > > procfs thing. > >

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Khalid Aziz
On 03/25/2014 11:44 AM, Andrew Morton wrote: So the procfs file is written in binary format and is read back in ascii format. Seems odd. Perhaps this should all be done as a new syscall rather than some procfs thing. I didn't want to add yet another syscall which will then need to be added

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Khalid Aziz
On 03/25/2014 11:46 AM, Oleg Nesterov wrote: On 03/25, Khalid Aziz wrote: fs/proc/base.c | 89 This code can be simplified, but the real question is why do we need it. Just add PR_SET_PREEMPT_DELAY ? Oleg. I like this idea! Thanks. -- Khali

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Oleg Nesterov
On 03/25, Khalid Aziz wrote: > > fs/proc/base.c | 89 This code can be simplified, but the real question is why do we need it. Just add PR_SET_PREEMPT_DELAY ? Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [PATCH v2] Pre-emption control for userspace

2014-03-25 Thread Andrew Morton
On Tue, 25 Mar 2014 11:17:50 -0600 Khalid Aziz wrote: > > This patch adds a way for a thread to request additional timeslice from > the scheduler if it is about to be preempted, so it could complete any > critical task it is in the middle of. This functionality helps with > performance on databa