Messages in this thread |  | | | Date | Thu, 16 Sep 2004 09:53:39 +0200 | | From | Andi Kleen <> | | Subject | Re: [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm |
On Thu, Sep 16, 2004 at 09:44:31AM +0200, Ingo Molnar wrote: > it only works on pointer less kernels because the spinlock profile > unwinding is _conditional_ on an FP kernel right now: > > #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) > unsigned long profile_pc(struct pt_regs *regs) > { > ... > > on non-FP kernels you'll see all the overhead in the single spin_lock() > function, agreed?
Agreed. Ok, should be easy to fix with the same scheme, except that it has to use offset 0 instead of 1 for the !FP case. I will cook up a patch.
BTW the SMP check is also wrong because preemptive kernels also need this unwinding, although they should not spend too much time in locking.
> > > in this respect - it might work if you can detect for sure at build time > > > whether there's any local variable. Tricks like this really tend to > > > haunt us later. > > > > There are already lots of such assumptions in the kernel (e.g. WCHAN > > and others). I don't think adding one more is a big issue. > > wchan has only one assumption: that that all __sched section functions
It's more than WCHAN, e.g. sysrq-t assumes it too.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |