[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1154272838.2941.30.camel@laptopd505.fenrus.org>
Date: Sun, 30 Jul 2006 17:20:38 +0200
From: Arjan van de Ven <arjan@...radead.org>
To: Jiri Slaby <jirislaby@...il.com>
Cc: Avi Kivity <avi@...o.co.il>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: FP in kernelspace
On Sun, 2006-07-30 at 17:08 +0159, Jiri Slaby wrote:
> Arjan van de Ven wrote:
> >>> So 2 questions are:
> >>> 1) howto FP in kernel
> >>>
> >> kernel_fpu_begin();
> >> c = d * 3.14;
> >> kernel_fpu_end();
>
> Yup, I know about this possibility, but this is only x86 specific?!
>
> > unfortunately this only works for MMX not for real fpu (due to exception
> > handling uglies)
>
> concludes it's not multiplatform at all... For that reasen I (maybe) want some
> "protocol" for communication with US, where I can easily compute it.]
easiest might be a shared mmap ring buffer (well 2 of these actually),
kernel puts data in buffer, updates ring pointer (and wakes userspace if
needed). Userspace notices data in ring, does math, puts data back in
the 2nd ringbuffer and updates that ring pointer. Then maybe does a
syscall to 'wake' the kernel. Kernel then sees data in the 2nd
ringbuffer and gets it. In addition to the wakeups I mentioned you can
also poll for the buffers; the wakeups are just there for extra safety.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists