public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 1/3] sched: rt: account the cpu time during the tick
Date: Tue, 18 Dec 2007 18:41:21 +0100	[thread overview]
Message-ID: <20071218174428.481724000@chello.nl> (raw)
In-Reply-To: 20071218174120.711901000@chello.nl

[-- Attachment #1: sched-rt-update.patch --]
[-- Type: text/plain, Size: 803 bytes --]

Realtime tasks would not account their runtime during ticks. Which would lead
to:

        struct sched_param param = { .sched_priority = 10 };
        pthread_setschedparam(pthread_self(), SCHED_FIFO, &param);

	while (1) ;

Not showing up in top.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched_rt.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/kernel/sched_rt.c
===================================================================
--- linux-2.6.orig/kernel/sched_rt.c
+++ linux-2.6/kernel/sched_rt.c
@@ -837,6 +837,8 @@ static void prio_changed_rt(struct rq *r
 
 static void task_tick_rt(struct rq *rq, struct task_struct *p)
 {
+	update_curr_rt(rq);
+
 	/*
 	 * RR tasks need a special form of timeslice management.
 	 * FIFO tasks have no timeslices.

--


  reply	other threads:[~2007-12-18 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18 17:41 [PATCH 0/3] various scheduler patches Peter Zijlstra
2007-12-18 17:41 ` Peter Zijlstra [this message]
2007-12-18 17:41 ` [PATCH 2/3] sched: sched_rt_entity Peter Zijlstra
2007-12-18 17:41 ` [PATCH 3/3] sched: SCHED_FIFO/SCHED_RR watchdog timer Peter Zijlstra
2007-12-19 10:18 ` [PATCH 0/3] various scheduler patches Ingo Molnar

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=20071218174428.481724000@chello.nl \
    --to=a.p.zijlstra@chello.nl \
    --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