From: Peter Zijlstra <peterz@infradead.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: Fix RCU stall upon ENOMEM atsched_create_group().
Date: Tue, 6 Jan 2015 15:56:14 +0100 [thread overview]
Message-ID: <20150106145614.GZ29390@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <201501062345.IGG21352.SQFHJOOOVtMFFL@I-love.SAKURA.ne.jp>
On Tue, Jan 06, 2015 at 11:45:29PM +0900, Tetsuo Handa wrote:
> Peter Zijlstra wrote:
> > On Thu, Dec 25, 2014 at 10:10:45PM +0900, Tetsuo Handa wrote:
> > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > > index ef2b104..586ee15 100644
> > > --- a/kernel/sched/fair.c
> > > +++ b/kernel/sched/fair.c
> > > @@ -7756,8 +7756,12 @@ static void task_move_group_fair(struct task_struct *p, int queued)
> > > void free_fair_sched_group(struct task_group *tg)
> > > {
> > > int i;
> > > + struct cfs_bandwidth *cfs_b;
> > >
> > > - destroy_cfs_bandwidth(tg_cfs_bandwidth(tg));
> > > + /* Check whether init_cfs_bandwidth() was called. */
> > > + cfs_b = tg_cfs_bandwidth(tg);
> > > + if (cfs_b->throttled_cfs_rq.next)
> > > + destroy_cfs_bandwidth(cfs_b);
> > >
> > > for_each_possible_cpu(i) {
> > > if (tg->cfs_rq)
> >
> > This doesn't actually compile for !CONFIG_CFS_BANDWIDTH, how about:
> >
> > ---
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -4005,6 +4005,10 @@ void __start_cfs_bandwidth(struct cfs_ba
> >
> > static void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b)
> > {
> > + /* init_cfs_bandwidth() was not called */
> > + if (!cfs_b->throttled_cfs_rq.next)
> > + return;
> > +
> > hrtimer_cancel(&cfs_b->period_timer);
> > hrtimer_cancel(&cfs_b->slack_timer);
> > }
> >
> I posted "#ifdef CONFIG_CFS_BANDWIDTH" version 7 minutes ago.
> But I'm fine with your patch. Thank you.
Yeah saw that, its what I did first too, then figured the ifdef was ugly
;-)
next prev parent reply other threads:[~2015-01-06 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-25 13:10 [PATCH] sched/fair: Fix RCU stall upon ENOMEM at sched_create_group() Tetsuo Handa
2015-01-06 10:35 ` Peter Zijlstra
2015-01-06 14:03 ` [PATCH] sched/fair: Fix RCU stall upon ENOMEM atsched_create_group() Tetsuo Handa
2015-01-06 14:10 ` [PATCH] sched/fair: Fix RCU stall upon ENOMEM at sched_create_group() Peter Zijlstra
2015-01-06 14:45 ` [PATCH] sched/fair: Fix RCU stall upon ENOMEM atsched_create_group() Tetsuo Handa
2015-01-06 14:56 ` Peter Zijlstra [this message]
2015-01-09 12:34 ` [tip:sched/urgent] sched/fair: Fix RCU stall upon -ENOMEM in sched_create_group() tip-bot for Tetsuo Handa
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=20150106145614.GZ29390@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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
Powered by JetHome