免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2443 | 回复: 0
打印 上一主题 下一主题

Solaris 10 内核 Memory [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-16 13:52 |只看该作者 |倒序浏览


  • 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
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP