Re: [PATCH] mm: move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME to file linux/slab.h

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

 



thanks for review my patch.

I want to move these macros to linux/slab.h cause I don't want perform merge in slab level.   for example. ss read /proc/slabinfo to finger out how many requests pending in the TCP listern queue.  it  use slabe name "tcp_timewait_sock_ops" search in /proc/slabinfo, although the name is obsolete. so I committed other patch  to iproute2, replaced tcp_timewait_sock_ops by request_sock_TCP, but it still not work, because  slab request_sock_TCP  merge into kmalloc-256.

how could I prevent this merge happen.  I'm new to kernel, this is my first time submit a kernel patch, thanks!


On Wed, Jan 7, 2015 at 11:16 AM, Christoph Lameter <cl@xxxxxxxxx> wrote:
On Wed, 7 Jan 2015, Bryton Lee wrote:

> move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME from file mm/slab_common.c
> to file linux/slab.h.
> let other kernel code create slab can use these flags.

This does not make sense. The fact that a slab has been merged is
available from a field in the kmem_cache structure (aliases).


These two macros are criteria for the slab allocators to perform merges.
The merge decision is the slab allocators decision and not the decision of
other kernel code.





--
Best Regards

Bryton.Lee


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]