- 论坛徽章:
- 0
|
Kernel allocations. The kernel uses memory to manage information about internal system state; for example, memory used to hold the list of processes in the system. The kernel allocates memory from the freelist for these purposes with its own allocators: vmem and slab. However, unlike process and file allocations, the kernel seldom returns memory to the freelist; memory is allocated and freed between kernel subsystems and the kernel allocators. Memory is consumed from the freelist only when the total kernel allocation grows.
Memory allocated to the kernel is mostly nonpageable and so cannot be managed by the system page scanner daemon. Memory is returned to the system freelist proactively by the kernel's allocators when a global memory shortage occurs.
在没有查明amr系统为什么系统内核占用了大量的物理内存前,真是不愿意看到这段,它居然说the kernel seldom returns memory to the freelist; memory is allocated and freed between kernel subsystems and the kernel allocators..God!!还我点物理内存吧,你占那么多干嘛去了!!!?
The kernel virtual memory layout differs from platform to platform, mostly based on the platform's MMU architecture. On x86, and platforms earlier than the sun4u, the kernel uses the top 256 Mbytes or 512 Mbytes of a common virtual address space, shared by the process and kernel. Sharing the kernel address space with the process address space limits the amount of usable kernel virtual address space to 256 Mbytes and 512 Mbytes, respectively, which is a substantial limitation on some of the older platforms.
内核虚拟内存很大程度上取决于MMU的架构。在x86上,并且硬件平台比sun4u旧的话,内核会用到最多256M或者512M
On sun4u platforms, the kernel has its own virtual address space context and consequently can be much larger. The sun4u kernel address space is 4 Gbytes on 32-bit kernels and spans the full 64-bit address range on 64-bit kernels.
Sun4u的内核地址空间在32bit内核上是4G,64bit内核则可以用到整个64bit的地址范围。
The kernel virtual address space contains the following major mappings:
The kernel text and data (mappings of the kernel binary)
The kernel 64-bit heap (data structures, caches, etc.)
A 32-bit heap, for module text and data (64-bit kernels only)
Critical virtual memory data structures (TSB, etc.)
A place for mapping the file system cache (segmap)
Using the modinfo command, we can see on a sun4u system that the initial modules are loaded from the kernel-text large page.
Solaris Kernel Memory Segment Drivers
Segment
Function
seg_kmem
Allocates and maps nonpageable kernel memory pages.
seg_kp
Allocates, maps, and handles page faults for pageable kernel memory.
seg_nf
Nonfaulting kernel memory driver.
seg_map
Maps the file system cache into the kernel address space.
seg_kpm
Maps physical memory into the kernel address space, on 64-bit platforms. Allows fast access to file system page cache.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/29885/showart_1723239.html |
|