From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Mike Galbraith <efault@gmx.de>,
Lennart Poettering <mztabzr@0pointer.de>
Subject: Re: [RFC][PATCH] sched: SCHED_FIFO watchdog timer
Date: Mon, 15 Oct 2007 15:57:42 +0200 [thread overview]
Message-ID: <1192456662.27435.74.camel@twins> (raw)
In-Reply-To: <b647ffbd0710150626v4273814esce681daa4467f173@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]
On Mon, 2007-10-15 at 15:26 +0200, Dmitry Adamushko wrote:
> On 14/10/2007, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > The below patch is an idea proposed by tglx and depends on sched-devel +
> > the hrtick patch previously posted.
> >
> > The current watchdog action is to demote the task to SCHED_NORMAL,
> > however it might be wanted to deliver a signal instead (or have more per
> > task configuration state). Which is why I added Lennart to the CC list
> > as I gathered he would like something like this for PulseAudio.
> >
> > ---
> > Subject: sched: SCHED_FIFO watchdog timer
>
> Why only SHCED_FIFO and not SCHED_RR?
> Their (mis)behavior is similar wrt SCHED_NORMAL tasks.
Because SCHED_FIFO is easier, _RR is for later. It was mostly an RFC to
request behavioural wishes from the users.
>
> > +#ifdef CONFIG_SCHED_HRT_TICK
> > +static int fifo_watchdog(struct rq *rq, struct task_struct *p, int queued)
> > +{
> > + if (likely(!queued || p->policy != SCHED_FIFO))
> > + return 0;
> > +
> > + /*
> > + * task has been naughty, turn into SCHED_NORMAL
> > + */
> > + printk(KERN_INFO "SCHED_FIFO task %s/%d exceeded his runtime quota,"
> > + " demoting to regular task\n", p->comm, task_pid_nr(p));
> > + deactivate_task(rq, p, 0);
> > + __setscheduler(rq, p, SCHED_NORMAL, 0);
> > + activate_task(rq, p, 0);
> > + resched_task(p);
>
> I guess, put_prev_task() / set_curr_task() should be called (for the
> case of task_running(p)) to make it group-scheduler-friendly (as it's
> done e.g. in sched_setscheduler()).
>
> (normilize_task() should probably do the same)
Right, that is where I copied from, I'll pull the functionality into a
single function and make this and the sysrq stuff use it.
Thanks!
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-10-15 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 20:51 [PATCH] sched: high-res preemption tick Peter Zijlstra
2007-10-13 7:18 ` Mike Galbraith
2007-10-13 8:55 ` Peter Zijlstra
2007-10-13 9:17 ` Peter Zijlstra
2007-10-13 10:11 ` Mike Galbraith
2007-10-13 23:13 ` Peter Zijlstra
2007-10-13 23:16 ` Peter Zijlstra
2007-10-14 6:34 ` Mike Galbraith
2007-10-13 22:51 ` [RFC][PATCH] sched: SCHED_FIFO watchdog timer Peter Zijlstra
2007-10-15 13:26 ` Dmitry Adamushko
2007-10-15 13:57 ` Peter Zijlstra [this message]
2007-10-15 14:25 ` Lennart Poettering
2007-10-15 21:32 ` Kay Sievers
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=1192456662.27435.74.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=dmitry.adamushko@gmail.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mztabzr@0pointer.de \
--cc=tglx@linutronix.de \
/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