2.6.9-rc4-mm1
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightlyI'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that one?
-Andi
-------------------------------------
Fixed version of profile optimization
kernel/profile.c +10 -3
@@ -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)); }
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightly
Quoted 5 lines
Quoted 3 lines
I'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
This one does not apply to -mm.
Greets,
RJW
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"
Quoted 9 lines · Rafael J. Wysocki
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightly
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
I'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
This one does not apply to -mm.
Use this:
include/linux/profile.h +0 -0
@@ -8,6 +8,7 @@
#include <linux/init.h>
#include <linux/cpumask.h>
#include <asm/errno.h>
+#include <asm/atomic.h>
#define CPU_PROFILING 1
#define SCHED_PROFILING 2
@@ -17,8 +18,8 @@
/* init basic kernel profiler */
void __init profile_init(void);
-void profile_tick(int, struct pt_regs *); -void profile_hit(int, void *);
+void FASTCALL(__profile_hit(void *));
+
#ifdef CONFIG_PROC_FS
void create_prof_cpu_mask(struct proc_dir_entry *); #else
@@ -101,6 +102,26 @@
#endif /* CONFIG_PROFILING */
+static inline void profile_hit(int type, void *pc)
+{
+ extern int prof_on;
+ extern atomic_t *prof_buffer;
+
+ if (prof_on == type && prof_buffer)
+ __profile_hit(pc);
+}
+
+static inline void profile_tick(int type, struct pt_regs *regs) +{
+ extern cpumask_t prof_cpu_mask;
+
+ if (type != CPU_PROFILING)
+ return;
+ profile_hook(regs);
+ if (!user_mode(regs) && cpu_isset(smp_processor_id(), prof_cpu_mask))
+ profile_hit(type, (void *)profile_pc(regs));
+}
+
#endif /* __KERNEL__ */
#endif /* _LINUX_PROFILE_H */
kernel/profile.c +0 -0
@@ -34,10 +34,10 @@
#define NR_PROFILE_HIT (PAGE_SIZE/sizeof(struct profile_hit))
#define NR_PROFILE_GRP (NR_PROFILE_HIT/PROFILE_GRPSZ)
-static atomic_t *prof_buffer;
+atomic_t *prof_buffer;
static unsigned long prof_len, prof_shift;
-static int prof_on;
-static cpumask_t prof_cpu_mask = CPU_MASK_ALL;
+int prof_on;
+cpumask_t prof_cpu_mask = CPU_MASK_ALL;
#ifdef CONFIG_SMP
static DEFINE_PER_CPU(struct profile_hit *[2], cpu_profile_hits); static DEFINE_PER_CPU(int, cpu_profile_flip);
@@ -284,14 +284,12 @@
up(&profile_flip_mutex); }
-void profile_hit(int type, void *__pc)
+void fastcall __profile_hit(void *__pc)
{
unsigned long primary, secondary, flags, pc = (unsigned long)__pc;
int i, j, cpu;
struct profile_hit *hits;- if (prof_on != type || !prof_buffer)
- return; pc = min((pc - (unsigned long)_stext) >> prof_shift, prof_len - 1); i = primary = (pc & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT; secondary = (~(pc << 1) & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT;
@@ -381,25 +379,17 @@
#define profile_flip_buffers() do { } while (0)
#define profile_discard_flip_buffers() do { } while (0)
-inline void profile_hit(int type, void *__pc)
+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)]); }
#endif /* !CONFIG_SMP */
-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));
-}
-
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.1 (Community) for i586
Linux 2.6.9-rc4-mm1 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1
Quoted 15 lines · J.A. Magallon
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Andi Kleen
Quoted 9 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightlyI'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
This one does not apply to -mm.
Use this:
[-- snip --]
This one does not apply too.
Greets,
RJW
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"
Quoted 19 lines · Rafael J. Wysocki
Quoted 18 lines · J.A. Magallon
Quoted 16 lines · Rafael J. Wysocki
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightlyQuoted 5 lines
Quoted 3 lines
I'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This one does not apply to -mm.
Use this:
[-- snip --]
This one does not apply too.
Uh ? What are you patching ?
I had just used and booted it, and I have now saved my own mail received from LKML to check if my mailer had been playin with it, and it patches fine. Sure you applied -mm1 before ? Is you mailer changing tabs to spaces or wrapping lines ?
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.1 (Community) for i586
Linux 2.6.9-rc4-mm1 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1
Quoted 8 lines · J.A. Magallon
Quoted 6 lines · Rafael J. Wysocki
Quoted 5 lines · J.A. Magallon
Quoted 3 lines · Rafael J. Wysocki
Quoted 2 lines · Andi Kleen
Tim Cambrant <[email protected]> writes:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Andrew Morton
Quoted 4 lines
optimize-profile-path-slightly.patch
Optimize profile path slightlyI'm still getting an oops at startup with this patch. After
reversing
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
it, everything is fine. Weren't you supposed to remove that from
your
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that
one?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
[-- snip --]
This one does not apply to -mm.
Use this:
Quoted 8 lines
Quoted 4 lines
[-- snip --]
This one does not apply too.
Uh ? What are you patching ?
I had just used and booted it, and I have now saved my own mail received from LKML to check if my mailer had been playin with it, and it patches
fine.
Quoted 2 lines
Sure you applied -mm1 before ? Is you mailer changing tabs to spaces or wrapping lines ?
Ahh, it's on top of optimize-profile-path-slightly.patch, not instead of it (Andi's patch was meant to be instead of it). Applied.
Thanks,
RJW
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"
Quoted 9 lines · Rafael J. Wysocki
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightly
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
This one does not apply to -mm.
You have to revert the previous version first.
-Andi
Quoted 14 lines · Andi Kleen
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Andi Kleen
Quoted 9 lines · Tim Cambrant
Quoted 4 lines · Andrew Morton
optimize-profile-path-slightly.patch
Optimize profile path slightlyI'm still getting an oops at startup with this patch. After reversing it, everything is fine. Weren't you supposed to remove that from your tree until it was fixed?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
There's a fixed version around. I thought Andrew had merged that one?
[-- snip --]
This one does not apply to -mm.
You have to revert the previous version first.
I know that. I should have said that it did not apply _after_ reverting the previous version.
Greets,
RJW
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"