From: Mike Galbraith <bitbucket@online.de>
To: tkhai@yandex.ru
Cc: Juri Lelli <juri.lelli@gmail.com>,
mingo@redhat.com, peterz@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/rt: fix rt timer activation/deactivation
Date: Wed, 26 Feb 2014 03:37:38 +0100 [thread overview]
Message-ID: <1393382258.5142.4.camel@marge.simpson.net> (raw)
In-Reply-To: <1393361805.12438.6.camel@HP-250-G1-Notebook-PC>
On Wed, 2014-02-26 at 00:56 +0400, Kirill Tkhai wrote:
> On Вт, 2014-02-25 at 17:05 +0100, Juri Lelli wrote:
> > Destroy rt bandwidth timer when rq has no more RT tasks, even when
> > CONFIG_RT_GROUP_SCHED is not set.
> >
> > Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
> > ---
> > kernel/sched/rt.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> > index a2740b7..7dba25a 100644
> > --- a/kernel/sched/rt.c
> > +++ b/kernel/sched/rt.c
> > @@ -86,12 +86,12 @@ void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq)
> > raw_spin_lock_init(&rt_rq->rt_runtime_lock);
> > }
> >
> > -#ifdef CONFIG_RT_GROUP_SCHED
> > static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b)
> > {
> > hrtimer_cancel(&rt_b->rt_period_timer);
> > }
> >
> > +#ifdef CONFIG_RT_GROUP_SCHED
> > #define rt_entity_is_task(rt_se) (!(rt_se)->my_q)
> >
> > static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)
> > @@ -1011,8 +1011,12 @@ inc_rt_group(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
> > start_rt_bandwidth(&def_rt_bandwidth);
> > }
> >
> > -static inline
> > -void dec_rt_group(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) {}
> > +static void
> > +dec_rt_group(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
> > +{
> > + if (!rt_rq->rt_nr_running)
> > + destroy_rt_bandwidth(&def_rt_bandwidth);
> > +}
>
> The problem is bandwidth timer is not per-cpu. It's only for all
> processors from the span (sched_rt_period_mask()). Other CPUs may
> have enqueued RT tasks. So, it's not possible to do this.
BTW, I noticed you can no longer turn the turn the noisy thing off since
we grew DL. I added an old SGI boot parameter to tell it to go away.
-Mike
next prev parent reply other threads:[~2014-02-26 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 16:05 [PATCH] sched/rt: fix rt timer activation/deactivation Juri Lelli
2014-02-25 20:56 ` Kirill Tkhai
2014-02-26 2:37 ` Mike Galbraith [this message]
2014-02-26 9:07 ` Peter Zijlstra
2014-02-26 9:35 ` Kirill Tkhai
2014-02-26 10:01 ` Kirill Tkhai
2014-02-26 10:02 ` Mike Galbraith
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=1393382258.5142.4.camel@marge.simpson.net \
--to=bitbucket@online.de \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tkhai@yandex.ru \
/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