From: Darren Hart <dvhltc@us.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kerneL@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH -rt] Priority preemption latency
Date: Sat, 10 Jun 2006 22:49:25 -0700 [thread overview]
Message-ID: <200606102249.26063.dvhltc@us.ibm.com> (raw)
In-Reply-To: <20060610064850.GA11002@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 2092 bytes --]
On Friday 09 June 2006 23:48, Ingo Molnar wrote:
> * Darren Hart <dvhltc@us.ibm.com> wrote:
> > @@ -1543,6 +1543,17 @@ static int try_to_wake_up(task_t *p, uns
> > }
> > }
> >
> > + /*
> > + * XXX Don't send RT task elsewhere unless it can preempt current
> > + * XXX on other CPU. Better yet would be for awakened RT tasks to
> > + * XXX examine this(and all other) CPU(s) to see what is the best
> > + * XXX fit. For example there is no check here to see if the
> > + * XXX currently running task can be preempted (which would be the
> > + * XXX ideal case).
> > + */
> > + if (rt_task(p) && !TASK_PREEMPTS_CURR(p, rq))
> > + goto out_set_cpu;
> > +
>
> Great testcase! Note that we already do RT-overload wakeups further
> below:
>
> /*
> * If a newly woken up RT task cannot preempt the
> * current (RT) task then try to find another
> * CPU it can preempt:
> */
> if (rt_task(p) && !TASK_PREEMPTS_CURR(p, rq)) {
> smp_send_reschedule_allbutself();
> rt_overload_wakeup++;
> }
>
> what i think happened is that the above logic misses the case you have
> described in detail, and doesnt mark the current CPU for rescheduling.
>
> I.e. it sends an IPI to all _other_ CPUs, including the 'wrong target' -
> but it doesnt mark the current CPU for reschedule - hence if the current
> CPU is the only right target we might fail to handle this task!
>
> could you try the (untested) patch below, does it solve your testcase
> too?
Thanks for the updated patch! It wouldn't quite build (proc_misc.c still
referenced the old rt_overload_* variables, fixup patch attached removing
those print statements). I have it running on a 4 way opteron box running
prio-preempt in a timed while loop, exiting only on failure. It's been
running fine for several minutes - usually fails in under a mintue. We'll
see how it's doing in the morning :-)
--
Darren Hart
IBM Linux Technology Center
Realtime Linux Team
[-- Attachment #2: rto-proc_misc-fixup.patch --]
[-- Type: text/x-diff, Size: 1129 bytes --]
diff -Nurp linux-2.6.16/fs/proc/proc_misc.c linux-2.6.16-fixup/fs/proc/proc_misc.c
--- linux-2.6.16/fs/proc/proc_misc.c 2006-06-10 16:48:23.000000000 -0700
+++ linux-2.6.16-fixup/fs/proc/proc_misc.c 2006-06-10 17:00:55.000000000 -0700
@@ -569,19 +569,11 @@ static int show_stat(struct seq_file *p,
{
unsigned long nr_uninterruptible_cpu(int cpu);
extern int pi_initialized;
- extern int rt_overload_schedule,
- rt_overload_wakeup, rt_overload_pulled;
unsigned long rt_nr_running_cpu(int cpu);
extern atomic_t rt_overload;
int i;
- seq_printf(p, "rt_overload_schedule: %d\n",
- rt_overload_schedule);
- seq_printf(p, "rt_overload_wakeup: %d\n",
- rt_overload_wakeup);
- seq_printf(p, "rt_overload_pulled: %d\n",
- rt_overload_pulled);
seq_printf(p, "pi_init: %d\n", pi_initialized);
seq_printf(p, "nr_running(): %ld\n",
nr_running());
@@ -593,8 +585,6 @@ static int show_stat(struct seq_file *p,
for_each_cpu(i)
seq_printf(p, "rt_nr_running(%d): %ld\n",
i, rt_nr_running_cpu(i));
- seq_printf(p, "rt_overload: %d\n", atomic_read(&rt_overload));
-
}
#endif
next prev parent reply other threads:[~2006-06-11 5:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-10 0:01 [RFC PATCH -rt] Priority preemption latency Darren Hart
2006-06-10 6:48 ` Ingo Molnar
2006-06-10 7:21 ` Ingo Molnar
2006-06-11 5:49 ` Darren Hart [this message]
2006-06-11 5:58 ` Ingo Molnar
2006-06-11 6:37 ` Ingo Molnar
2006-06-11 6:24 ` Darren Hart
2006-06-11 7:36 ` Ingo Molnar
2006-06-12 15:38 ` Darren Hart
2006-06-15 21:06 ` Mike Kravetz
2006-06-15 22:13 ` Darren Hart
2006-06-15 23:05 ` Esben Nielsen
2006-06-15 22:48 ` Mike Kravetz
2006-07-11 16:48 ` Mike Kravetz
2006-06-12 20:12 ` Mike Kravetz
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=200606102249.26063.dvhltc@us.ibm.com \
--to=dvhltc@us.ibm.com \
--cc=linux-kerneL@vger.kernel.org \
--cc=mingo@elte.hu \
--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