All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernelmail.jms@gmail.com (julie Sullivan)
To: kernelnewbies@lists.kernelnewbies.org
Subject: floating points in kernel space
Date: Tue, 4 Jan 2011 22:19:06 +0000	[thread overview]
Message-ID: <AANLkTim95MpWeSk517UaYHT7tPS2__RKBQb+WQyjipRg@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=iuD7VNP9ksOimZe+NNCShsvw4ApSd3ukF2K7n@mail.gmail.com>

>
> On Tue, Jan 4, 2011 at 22:44, Dave Hylands <dhylands@gmail.com> wrote:
> > That is correct. In some architectures, attempts to use floating point
> > from the kernel will work. I've seen some x86 code that uses it.
>
>
> AFAIK, once x86 didn't supported due to floating point related
> registers are not correctly (or even doing?) saved and restored during
> context switching. So maybe it is fixed now...
>
> --
>

I've often wondered about this oft-cited kernel behaviour too, in my
naivety.  I understand
that this must be on a per-arch basis, but does this mean that the kernel
doesn't police FP
access at _all_ (perhaps this is what Mohit means too)? Does code like X for
example have to access it directly, or does it just use the GPU? What about
other user-space code - does it
have a separate library and do its own security? Video drivers?
Sorry if these are basic questions, I grepped for float in the kernel but
as-yet the associated
code looks really arcane to me - if anyone could answer any of these
questions generally
(if that's possible) that would be very helpful with visualizing the
mechanism.
Maybe I'm looking in the wrong place.

When I started looking at the kernel I imagined this small, neat, concise
piece of highly
efficient code so I wasn't surprised there was no float (don't laugh - how
one learns :-/ ) ...
I suppose any float per-arch 'hacks' (to get a larger word size) would not
be worth
the overhead of the mode switch and extra code?

Thanks
Julie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110104/bb73a59d/attachment-0001.html 

  reply	other threads:[~2011-01-04 22:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 12:43 floating points in kernel space mohit verma
2011-01-04 14:31 ` Victor Rodriguez
2011-01-04 15:44 ` Dave Hylands
2011-01-04 16:57   ` Mulyadi Santosa
2011-01-04 22:19     ` julie Sullivan [this message]
2011-01-04 22:32       ` Greg Freemyer
2011-01-04 23:26         ` julie Sullivan
2011-01-21 14:38           ` lei yang

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=AANLkTim95MpWeSk517UaYHT7tPS2__RKBQb+WQyjipRg@mail.gmail.com \
    --to=kernelmail.jms@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.