Re: Problems compiling kernel modules

From: Alan Cox
Date: Mon Aug 23 2004 - 12:32:55 EST


On Llu, 2004-08-23 at 16:44, Lei Yang wrote:
> I was trying to build a compression/decompression utility with my
> algorithm in kernel, and want to use it in some of the device drivers.
> And in that algorithm, we need floating-point.

In which case the best place to look (if it needs to be kernel side) is
probably drivers/md/ which shows how you can use the FPU state. There is
a cost to it as you have to save/restore the user FP state and on x86
that is expensive of course.

Historically we've always tried to keep compression algorithms in user
space. The video4linux layer for example pushes most of this to the user
and that allows the user program to make a more intelligent assessment
of the input format and desired target. This avoids things like kernel
drivers turning data from one format to another and user space libraries
turning it back again.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/