From: Andrew Morton <akpm@linux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>, Michal Hocko <mhocko@suse.cz>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Mandeep Singh Baines <msb@chromium.org>
Subject: Re: [PATCH] watchdog: Make sure the watchdog thread gets CPU on loaded system
Date: Mon, 19 Mar 2012 15:00:50 -0700 [thread overview]
Message-ID: <20120319150050.4ab474e1.akpm@linux-foundation.org> (raw)
In-Reply-To: <1331827471.18960.195.camel@twins>
On Thu, 15 Mar 2012 17:04:31 +0100
Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Thu, 2012-03-15 at 11:54 -0400, Don Zickus wrote:
> > > > Why did watchdog() reset the scheduling policy seven instructions
> > > > before exiting? Seems pointless.
> > >
> > > It has been introduced by Thomas in cba9bd22. To be honest I don't
> > > understand why it makes a sense?
> >
> > Yeah I noticed that too. I didn't bother questioning it either when
> > it
> > went in. I just assumed Thomas and Peter know scheduling a lot better
> > than I do. :-)
>
> I just dug through my IRC logs and the reason is that running the entire
> exit path as a highest priority RT task incurs a latency spike to other
> tasks running on the system (313us). Since there's absolutely no point
> in running the exit path as a RT task, tglx made it not do that.
IRC logs, huh?
--- a/kernel/watchdog.c~a
+++ a/kernel/watchdog.c
@@ -349,6 +349,10 @@ static int watchdog(void *unused)
set_current_state(TASK_INTERRUPTIBLE);
}
+ /*
+ * Drop the policy/priority elevation during thread exit to avoid a
+ * scheduling latency spike.
+ */
__set_current_state(TASK_RUNNING);
sched_setscheduler(current, SCHED_NORMAL, ¶m);
return 0;
_
next prev parent reply other threads:[~2012-03-19 22:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 20:38 [PATCH] watchdog: Make sure the watchdog thread gets CPU on loaded system Don Zickus
2012-03-14 20:59 ` Mandeep Singh Baines
2012-03-14 23:19 ` Andrew Morton
2012-03-15 1:45 ` Mandeep Singh Baines
2012-03-15 11:00 ` Peter Zijlstra
2012-03-15 11:06 ` Peter Zijlstra
2012-03-15 12:42 ` Ingo Molnar
2012-03-15 14:00 ` Peter Zijlstra
2012-03-15 14:35 ` Don Zickus
2012-03-15 15:39 ` Mandeep Singh Baines
2012-03-15 16:10 ` Peter Zijlstra
2012-03-15 16:11 ` Peter Zijlstra
2012-03-15 16:16 ` Peter Zijlstra
2012-03-15 17:04 ` Mandeep Singh Baines
2012-03-15 8:02 ` Michal Hocko
2012-03-15 15:54 ` Don Zickus
2012-03-15 16:04 ` Peter Zijlstra
2012-03-19 22:00 ` Andrew Morton [this message]
2012-03-15 16:14 ` Michal Hocko
2012-03-15 17:14 ` Don Zickus
-- strict thread matches above, loose matches on Subject: below --
2012-03-13 9:45 [PATCH] watchdog: make " Michal Hocko
2012-03-13 13:42 ` Don Zickus
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=20120319150050.4ab474e1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mingo@elte.hu \
--cc=msb@chromium.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.