[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1416881559.20575.14.camel@linux-t7sj.site>
Date: Mon, 24 Nov 2014 18:12:39 -0800
From: Davidlohr Bueso <dave@...olabs.net>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Khalid Aziz <khalid.aziz@...cle.com>, corbet@....net,
mingo@...hat.com, hpa@...or.com, peterz@...radead.org,
riel@...hat.com, akpm@...ux-foundation.org, rientjes@...gle.com,
ak@...ux.intel.com, mgorman@...e.de, liwanp@...ux.vnet.ibm.com,
raistlin@...ux.it, kirill.shutemov@...ux.intel.com,
atomlin@...hat.com, avagin@...nvz.org, gorcunov@...nvz.org,
serge.hallyn@...onical.com, athorlton@....com, oleg@...hat.com,
vdavydov@...allels.com, daeseok.youn@...il.com,
keescook@...omium.org, yangds.fnst@...fujitsu.com,
sbauer@....utah.edu, vishnu.ps@...sung.com, axboe@...com,
paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: [PATCH v3] sched/fair: Add advisory flag for borrowing a
timeslice (was: Pre-emption control for userspace)
On Tue, 2014-11-25 at 00:35 +0100, Thomas Gleixner wrote:
> On Mon, 24 Nov 2014, Khalid Aziz wrote:
> > sched/fair: Add advisory flag for borrowing a timeslice
> >
> > This patch adds a way for a task to request to borrow one timeslice
> > from future if it is about to be preempted, so it could delay
> > preemption and complete any critical task it is in the middle of.
> >
> > This feature helps with performance on databases and has been
> > used for many years on other OSs by the databases. This feature
> > helps in situation where a task acquires a lock before performing a
> > critical operation on the database and happens to get preempted before
> > it completes its task. This lock being held causes all other tasks
> > that also acquire the same lock to perform their critical operation
> > on the database, to start queueing up and causing large number of
> > context switches. This queueing problem can be avoided if the task
> > that acquires lock first could request scheduler to let it borrow one
> > timeslice once it enters its critical section and hence allow it to
> > complete its critical section without causing queueing problem. If
>
> While you are niftily avoiding to talk about the nature of the lock, I
> can take it for granted that you are talking about user space
> spinlocks, right?
Probably, or perhaps userspace fair locks. If the task that is next in
line to acquire the lock is preempted and the lock is released, fairness
prevents anyone else from taking it instead.
Thanks,
Davidlohr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists