1 Jun 2004 01:24
Re: [LKML]kmalloc -contiguous locations ?
tabris <tabris <at> tabris.net>
2004-05-31 23:24:00 GMT
2004-05-31 23:24:00 GMT
On Monday 31 May 2004 5:49 am, Shobhit Mathur wrote: > Hello, > > I would like to know whether kmalloc() guarantees > virtually contiguous memory locations ? > Is there a limit on the amount of contiguous memory > that can be returned by kmalloc() ? First, kmalloc returns physically contiguous memory. second, the limit (on x86) is 128kb (32 pages), allocatable in powers of two pages. (1,2,4,8,16,32. often called 0-order thru 5-order allocations) vmalloc returns virtual contiguous allocations, with no guarantee on physical contiguity. The problem with vmalloc, iirc, is that there's a [total] limit of 128MB for vmallocs. Also remember that all kernel memory allocated with vmalloc() or kmalloc() is non-swappable. I don't know how this changes under any other architecture, such as x86-64 or PPC32/64. > > - Thank you > > - Shobhit Mathur -- tabris - A master was explaining the nature of Tao to one of his novices.(Continue reading)

seems to reveal the following possibilities.
>
Since you are using one of those Windows mailers and didn't enter a
single end-of-line character, I detect that this is probably one
of those trolls. Nevertheless, the use of floating-point is forbidden
within the kernel. Period. Because anybody who thinks they need
floating-point mathematics within the kernel is completely without
a clue, the floating-point context is not saved/restored during system
calls.
You must pair a user-mode program (usually called a daemon) with
the kernel-mode interface to your hardware (your module). This
combination will provide whatever functionality you require. The
user-mode daemon does the math and probably a lot of other things
as well.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5583.66 BogoMips).
Note 96.31% of all statistics are fiction.
RSS Feed