public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Daniel Rosenthal <danielrosenthal@acm.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Ulrich Drepper <drepper@redhat.com>
Subject: Re: scheduling hrtimers while holding rq->lock
Date: Tue, 29 Jul 2008 22:52:10 +0200	[thread overview]
Message-ID: <1217364730.9348.1.camel@twins> (raw)
In-Reply-To: <4b6fba110807291223g16ca0bf1o54c270efac409d45@mail.gmail.com>

On Tue, 2008-07-29 at 15:23 -0400, Daniel Rosenthal wrote:
> What's the best way for scheduling code to start an hrtimer while
> holding the rq->lock?  I am trying to implement SCHED_SPORADIC
> (sporadic server) in the realtime scheduling class (rt_sched_class),
> and it needs to schedule aperiodic, asynchronous replenishment
> operations which are independent of timeslice expiration.  This is to
> implement the functionality that when a SCHED_SPORADIC task blocks or
> uses up its timeslice, one of these asynchronous events is scheduled
> to happen at some time offset in the future that doesn't necessarily
> correspond to any timeslice expiration.
> 
> Is there some way to schedule this event without duplicating the code
> that the generic scheduler currently uses for its hrtick_timer?  As
> in, is there a way to do this without adding a thread flag similar in
> function to TIF_HRTICK_RESCHED and calling an rt_sched_class function
> from do_notify_resume if the flag is set?
> 
> The code snippet below is what I am trying to do.
> 
> Please CC me explicitly in any replies.

Look at .27-rc1 ;-)


      reply	other threads:[~2008-07-29 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 19:23 scheduling hrtimers while holding rq->lock Daniel Rosenthal
2008-07-29 20:52 ` Peter Zijlstra [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=1217364730.9348.1.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=danielrosenthal@acm.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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