Re: 2.6.6-mm5

From: Eric W. Biederman (ebiederm_at_xmission.com)
Date: 05/24/04

  • Next message: David Lang: "Re: Linux 2.4 VS 2.6 fork VS thread creation time test"
    To: Andi Kleen <ak@muc.de>
    Date:	23 May 2004 18:02:50 -0600
    
    

    Andi Kleen <ak@muc.de> writes:

    > ebiederm@xmission.com (Eric W. Biederman) writes:
    >
    > > Currently I know of a safe version that will work on x86 on processors
    > > with sse support. And I how to generate 64bit I/O cycles with using
    > > mmx or x87 registers, but don't know if I can write code that touches
    > > the FPU registers that is interrupt safe.
    >
    > As long as you save/restore cr0 and the FPU registers and do clts
    > interrupts are not a problem. In fact interrupts are even easier that
    > process context, where you need preempt_disable().

    Thinking about this some more, I would need to transform every
    preempt_disable() into a local_irq_disable() if I wanted to save
    the FP registers to their home in struct task.

    It looks to me like the only way to handle all of the x87 and mmx
    subtleties is to call fsave which takes 108 bytes. That is a lot of
    stack bytes to eat in irq context, and I suspect it is time consuming,
    as well.

    So I suspect it makes most sense just submit a patch for a sse version
    of writeq on x86, and let the drivers that care use that. It does
    mean that the drivers that care can't build for pre PentiumIII
    hardware or must use a work around in generic kernels. So far the
    cure for that looks much worse than the disease.

    Eric
    -
    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: David Lang: "Re: Linux 2.4 VS 2.6 fork VS thread creation time test"

    Relevant Pages

    • Re: 2.6.6-mm5
      ... > the FPU registers that is interrupt safe. ... As long as you save/restore cr0 and the FPU registers and do clts ... interrupts are not a problem. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • APIC problems on VIA box
      ... I first noticed this on 2.6.0test3: on my Tyan KT133 SMP box all the interrupts ... LOC: 2314693 2314783 ... help debug the problem. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: CFQ + 2.6.13-rc4-RT-V0.7.52-02 = BUG: scheduling with irqs disabled
      ... which should all have stopped by the time we execute do_exit. ... > interrupts. ... queue typically bound to one of the pdflush threads which ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Fw: [RFC] Strange code in cpu_idle()
      ... > What happens if the processor became aware of a new grace period just ... I could also imagine somehow deferring ... > interrupts until pm_idle exits. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: mouse still losing sync and thus jumping around
      ... >> indeed producing worse results, the second one should work better. ... >> and letting me know if it gives better results. ... Yes, It usually happens either under high load, when mouse interrupts are ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)