Re: [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm

From: Andi Kleen (ak_at_suse.de)
Date: 09/16/04

  • Next message: Adrian Bunk: "Re: review MPSC driver"
    Date:	Thu, 16 Sep 2004 09:53:39 +0200
    To: Ingo Molnar <mingo@elte.hu>
    
    

    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/


  • Next message: Adrian Bunk: "Re: review MPSC driver"

    Relevant Pages

    • Re: RFD: Kernel release numbering
      ... and the only reason it works is that 2.4.x is a totally ... > things out, but it doesn't matter how many -rc kernels I'd do, it just ... It seems to me that the problem is not the numbering scheme. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [NFS] RE: [autofs] multiple servers per automount
      ... In newsgroup: linux.dev.kernel ... > Here is the quick fix for this in RH 2.1AS kernels: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Ingo Molnar and Con Kolivas 2.6 scheduler patches
      ... > Audio players fall into a special category of application, ... That is one problem space, and I guess if we fix that, we fix the X11 ... RH and UL and -aa kernels? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] Use MODULE_DEVICE_TABLE in sk98lin driver
      ... I just noticed sk98lin devices don't appear in modules.pcimap -- fix attached. ... The patch is relative to 2.6.10-rc2-mm3, but it should apply to mostly all ... other kernels with little to no modifications. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ext3 extended attributes refcounting wrong?
      ... There was a fix for that applied fairly ... But since I dual boot and switch kernels often, ... I use no xattrs, ACLs, or SELinux at all, and I always ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)