How do you comprehend the saying that the kernel's memory is not pageable whereas get_free_page use a page-oriented technique?

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Sat Jun 20 05:11:21 EDT 2020


On Sat, 20 Jun 2020 14:18:21 +0800, 孙世龙 sunshilong said:

> Unfortunately for kernel developers, allocating memory in the kernel
> is not as simple as allocating memory in userspace. A number of
> factors contribute to the complication, among them:
> The kernel is limited to about 1GB of virtual and physical memory.
> **The kernel's memory is not pageable.**

> If a module needs to allocate big chunks of memory, it is usually
> better to use a page-oriented technique.

Due to memory fragmentation, if a module needs (say) 2M of
memory for an I/O buffer, it's more likely to be able to allocate
512 4K pages scattered through the 1GB of memory than it
is to get 1 contiguous chunk of memory.

The fact it's not pageable doesn't mean that pages aren't relevant
as the unit of allocation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200620/6f4d902e/attachment-0001.sig>


More information about the Kernelnewbies mailing list