From: Khalid Aziz <khalid.aziz@oracle.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: tglx@linutronix.de, corbet@lwn.net, mingo@redhat.com,
hpa@zytor.com, peterz@infradead.org, riel@redhat.com,
akpm@linux-foundation.org, rientjes@google.com,
ak@linux.intel.com, mgorman@suse.de, raistlin@linux.it,
kirill.shutemov@linux.intel.com, atomlin@redhat.com,
avagin@openvz.org, gorcunov@openvz.org,
serge.hallyn@canonical.com, athorlton@sgi.com, oleg@redhat.com,
vdavydov@parallels.com, daeseok.youn@gmail.com,
keescook@chromium.org, yangds.fnst@cn.fujitsu.com,
sbauer@eng.utah.edu, vishnu.ps@samsung.com, axboe@fb.com,
paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice
Date: Tue, 25 Nov 2014 07:56:54 -0700 [thread overview]
Message-ID: <547498B6.1040108@oracle.com> (raw)
In-Reply-To: <20141125101238.GA19795@linux.vnet.ibm.com>
On 11/25/2014 03:12 AM, Srikar Dronamraju wrote:
>>
>> - Request to borrow timeslice is not guranteed to be honored.
>> - If the task is allowed to borrow, kernel will inform the task
>> of this. When this happens, task must yield the processor as soon
>> as it completes its critical section.
>> - If the task fails to yield processor after being allowed to
>> borrow, it is penalized by forcing it to skip its next time slot
>> by the scheduler.
>> - Task is charged additional time for the borrowed timeslice as
>> accumulated run time. This pushes it further down in consideration
>> for the next task to run.
>>
>
> Is there a way for us to identify if the lock is contended?
> Because it may not be prudent to allow a task to borrow timeslice for a
> lock which isnt contended.
>
Userspace knows that. It is hard to determine this from kernel. Darren
Hart had worked on a solution to solving similar issue and I spent fair
amount of time looking through that code. Darren's solution comes into
play after contention has already happened and does reduce the cost of
contention. Database folks think the cost is already too high once
contention has happened because of the resulting context switches and
post-contention solutions do not help. This solution helps reduce
contention on locks and userspace code designer is in best position to
determine which locks are subject to such contention.
--
Khalid
prev parent reply other threads:[~2014-11-25 14:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 20:56 [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice (was: Pre-emption control for userspace) Khalid Aziz
2014-11-24 22:43 ` Andi Kleen
[not found] ` <20141124224302.GL10824-KWJ+5VKanrL29G5dvP0v1laTQe2KTcn/@public.gmane.org>
2014-11-24 23:20 ` Khalid Aziz
2014-11-24 23:35 ` Thomas Gleixner
2014-11-25 2:12 ` Davidlohr Bueso
2014-11-25 4:20 ` Mike Galbraith
[not found] ` <1416889208.4335.127.camel-sZ+7a5bGyC/1wTEvPJ5Q0F6hYfS7NtTn@public.gmane.org>
2014-11-25 14:50 ` [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice Khalid Aziz
2014-11-25 17:46 ` Mike Galbraith
[not found] ` <1416937564.3512.15.camel-sZ+7a5bGyC/1wTEvPJ5Q0F6hYfS7NtTn@public.gmane.org>
2014-11-25 19:38 ` Khalid Aziz
2014-11-25 14:45 ` Khalid Aziz
[not found] ` <54749617.5030309-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-11-25 18:27 ` Davidlohr Bueso
2014-11-25 19:23 ` Khalid Aziz
[not found] ` <5474D71E.8070603-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-11-25 19:40 ` Davidlohr Bueso
2014-11-25 2:03 ` [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice (was: Pre-emption control for userspace) Rik van Riel
2014-11-25 6:30 ` Davidlohr Bueso
2014-11-25 13:38 ` Rik van Riel
2014-11-25 14:52 ` [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice Khalid Aziz
2014-11-25 15:25 ` Rik van Riel
[not found] ` <54749F77.50905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-11-25 17:22 ` Khalid Aziz
2014-11-25 17:45 ` Rik van Riel
[not found] ` <1416862595-24513-1-git-send-email-khalid.aziz-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-11-25 10:12 ` [PATCH v3] sched/fair: Add advisory flag for borrowing a timeslice (was: Pre-emption control for userspace) Srikar Dronamraju
2014-11-25 14:56 ` Khalid Aziz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547498B6.1040108@oracle.com \
--to=khalid.aziz@oracle.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=athorlton@sgi.com \
--cc=atomlin@redhat.com \
--cc=avagin@openvz.org \
--cc=axboe@fb.com \
--cc=corbet@lwn.net \
--cc=daeseok.youn@gmail.com \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=raistlin@linux.it \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=sbauer@eng.utah.edu \
--cc=serge.hallyn@canonical.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=vdavydov@parallels.com \
--cc=vishnu.ps@samsung.com \
--cc=yangds.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).