Re: 2.6.9-rc3-mm3

From: Andi Kleen
Date: Thu Oct 07 2004 - 06:26:01 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> Nick Sanders <sandersn@xxxxxxxxxxxxxx> wrote:
> >
> > On Thursday 07 October 2004 09:51, Andrew Morton wrote:
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6
> > >.9-rc3-mm3/
> > >
> >
> > I get the following oops when booting and it also stops kde (artswrapper) from
> > starting with the same call trace. USB seems to be working which is good.
>
> Could you please do
>
>
> cd /usr/src/linux
> wget ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm3/broken-out/optimize-profile-path-slightly.patch
> patch -R -p1 < optimize-profile-path-slightly.patch
>
> and retest?

Oops. I forgot the scheduling path indeed. Here's a new patch,
replacing the old. Sorry for the trouble.

-Andi

-------------------------------------------------------------

Fixed version of slight profile path optimization.

Signed-off-by: Andi Kleen <ak@xxxxxxx>

Index: linux/kernel/profile.c
===================================================================
--- linux.orig/kernel/profile.c 2004-09-30 10:35:51.%N +0200
+++ linux/kernel/profile.c 2004-10-07 13:22:33.%N +0200
@@ -181,20 +181,27 @@
EXPORT_SYMBOL_GPL(profile_event_register);
EXPORT_SYMBOL_GPL(profile_event_unregister);

-void profile_hit(int type, void *__pc)
+static inline void __profile_hit(int type, void *__pc)
{
unsigned long pc;

- if (prof_on != type || !prof_buffer)
- return;
pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
atomic_inc(&prof_buffer[min(pc, prof_len - 1)]);
}

+void profile_hit(int type, void *pc)
+{
+ if (prof_on != type || !prof_buffer)
+ return;
+ __profile_hit(type, pc);
+}
+
void profile_tick(int type, struct pt_regs *regs)
{
if (type == CPU_PROFILING)
profile_hook(regs);
+ if (prof_on != type || !prof_buffer)
+ return;
if (!user_mode(regs) && cpu_isset(smp_processor_id(), prof_cpu_mask))
profile_hit(type, (void *)profile_pc(regs));
}



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/