Re: ksm slab do not show up in /proc/slabinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 17, 2019 at 02:14:56PM +0800, wuzhouhui wrote:
> Hi, maybe it is a stupid question, but I just couldn't figure it out,
> since codes of ksm in 2.6.32 and 3.10.0 are similar.
> 
> In CentOS 6 (kernel 2.6.32 based), I can see ksm slab from /proc/slabinfo:
> $ grep ksm /proc/slabinfo 
> ksm_mm_slot            5     77     48   77    1 : tunables  120   60    8 : slabdata      1      1      0
> ksm_stable_node   414575 446016     40   92    1 : tunables  120   60    8 : slabdata   4848   4848      0
> ksm_rmap_item     43617468 43617638     64   59    1 : tunables  120   60    8 : slabdata 739282 739282      0
> 
> But in CentOS 7 (kernel 3.10.0 based), they gone:
> $ sudo grep ksm /proc/slabinfo 
> $
> 
> Why? ksm is compiled in kernel for both centos6 and centos7.

Hi,

Maybe you should try to add this option to the kernel command line :

--------------------
    slab_nomerge    [MM]
            Disable merging of slabs with similar size. May be
            necessary if there is some reason to distinguish
            allocs to different slabs, especially in hardened
            environments where the risk of heap overflows and
            layout control by attackers can usually be
            frustrated by disabling merging. This will reduce
            most of the exposure of a heap attack to a single
            cache (risks via metadata attacks are mostly
            unchanged). Debug options disable merging on their
            own.
            For more information see Documentation/vm/slub.rst.
--------------------

By default the slab are merged in CentOS 7.
I had this behaviour when switching from CentOS 6 to CentOS 7.

-- 
Aurélien



[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux