generic_bs_map()
Alan Cox
alc at rice.edu
Sat Jun 29 14:21:34 UTC 2013
Jeff and I have been looking at the various kmem_alloc() calls
throughout the kernel, and when we came to generic_bs_map() on arm, I
was a bit puzzled. In short, I believe that generic_bs_map() should be
calling kmem_alloc_nofault() instead of kmem_alloc(). It appears to me
that generic_bs_map() only wants a virtual address range from kmem_*,
which is what kmem_alloc_nofault() does. In contrast, kmem_alloc() also
allocates and maps physical memory at the returned address range. In
the case of generic_bs_map(), allocating and mapping physical memory is
pointless because generic_bs_map() overwrites those mappings with its
own. So, the physical pages allocated by kmem_alloc() are wasted.
Neither Jeff nor I have arm hardware to verify this change. Could
someone here please try it out?
Thanks,
Alan
More information about the freebsd-arm
mailing list