From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by kanga.kvack.org (Postfix) with ESMTP id 8492D6B0038 for ; Wed, 7 Jan 2015 02:32:33 -0500 (EST) Received: by mail-pd0-f171.google.com with SMTP id y13so3033602pdi.2 for ; Tue, 06 Jan 2015 23:32:33 -0800 (PST) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com. [2607:f8b0:400e:c03::22b]) by mx.google.com with ESMTPS id ny4si1234428pbb.247.2015.01.06.23.32.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 23:32:31 -0800 (PST) Received: by mail-pa0-f43.google.com with SMTP id kx10so3172495pab.2 for ; Tue, 06 Jan 2015 23:32:31 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 7 Jan 2015 15:32:30 +0800 Message-ID: Subject: Re: [PATCH] mm: move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME to file linux/slab.h From: Bryton Lee Content-Type: multipart/alternative; boundary=e89a8ffbaaab1df4cc050c0aed56 Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter Cc: iamjoonsoo.kim@lge.com, penberg@kernel.org, rientjes@google.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "vger.linux-kernel.cn" --e89a8ffbaaab1df4cc050c0aed56 Content-Type: text/plain; charset=UTF-8 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 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 --e89a8ffbaaab1df4cc050c0aed56 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.=C2=A0=C2=A0 for example. ss read /proc/slabinfo to finger ou= t how many requests pending in the TCP listern queue.=C2=A0 it=C2=A0 use sl= abe name "tcp_timewait_sock_ops" search in /proc/slabinfo, althou= gh the name is obsolete. so I committed other patch=C2=A0 to iproute2, repl= aced tcp_timewait_sock_ops by request_sock_TCP, but it still not work, beca= use=C2=A0 slab request_sock_TCP=C2=A0 merge into kmalloc-256.

how could I prevent this merge happen.=C2=A0 I'm new to kernel, this i= s my first time submit a kernel patch, thanks!


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

> move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME from file mm/slab_comm= on.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<= br> other kernel code.





--
Best Regards

Bryton.Lee

--e89a8ffbaaab1df4cc050c0aed56-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org