From: ebiederm@xmission.com (Eric W. Biederman)
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.6-mm5
Date: 23 May 2004 18:02:50 -0600 [thread overview]
Message-ID: <m1wu32n13p.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <m3r7tbtlrk.fsf@averell.firstfloor.org>
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
next prev parent reply other threads:[~2004-05-24 0:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1YAd2-6Th-13@gated-at.bofh.it>
[not found] ` <1YPF4-2hJ-11@gated-at.bofh.it>
[not found] ` <1YPOI-2nq-1@gated-at.bofh.it>
[not found] ` <1YRdQ-3pu-5@gated-at.bofh.it>
2004-05-23 11:39 ` 2.6.6-mm5 Andi Kleen
2004-05-23 21:32 ` 2.6.6-mm5 Eric W. Biederman
2004-05-24 0:02 ` Eric W. Biederman [this message]
2004-05-22 18:02 2.6.6-mm5 Adam Radford
-- strict thread matches above, loose matches on Subject: below --
2004-05-22 10:27 2.6.6-mm5 Oleg Nesterov
2004-05-22 8:36 2.6.6-mm5 Andrew Morton
2004-05-22 9:09 ` 2.6.6-mm5 Jeff Garzik
2004-05-22 9:22 ` 2.6.6-mm5 hch
2004-05-22 9:26 ` 2.6.6-mm5 Andrew Morton
2004-05-22 11:51 ` 2.6.6-mm5 R. J. Wysocki
2004-05-22 9:26 ` 2.6.6-mm5 hch
2004-05-22 9:32 ` 2.6.6-mm5 Andrew Morton
2004-05-22 9:41 ` 2.6.6-mm5 hch
2004-05-22 19:03 ` 2.6.6-mm5 Brian King
2004-05-22 9:38 ` 2.6.6-mm5 hch
2004-05-22 9:44 ` 2.6.6-mm5 Jens Axboe
2004-05-22 9:46 ` 2.6.6-mm5 Felipe Alfaro Solana
2004-05-23 15:51 ` 2.6.6-mm5 James Morris
2004-05-22 11:59 ` 2.6.6-mm5 Matthias Andree
2004-05-23 1:01 ` 2.6.6-mm5 Eric W. Biederman
2004-05-23 1:08 ` 2.6.6-mm5 Andrew Morton
2004-05-23 1:15 ` 2.6.6-mm5 Roland Dreier
2004-05-24 16:17 ` 2.6.6-mm5 Matt Mackall
2004-05-24 17:03 ` 2.6.6-mm5 Eric W. Biederman
2004-05-24 17:43 ` 2.6.6-mm5 Roland Dreier
2004-05-25 7:25 ` 2.6.6-mm5 Eric W. Biederman
2004-05-23 2:45 ` 2.6.6-mm5 Eric W. Biederman
2004-05-25 13:53 ` 2.6.6-mm5 Pavel Machek
2004-05-26 12:41 ` 2.6.6-mm5 Anders Gustafsson
2004-05-26 12:49 ` 2.6.6-mm5 Jens Axboe
2004-05-26 12:59 ` 2.6.6-mm5 Anders Gustafsson
2004-05-26 13:03 ` 2.6.6-mm5 Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1wu32n13p.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®