All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/16] mm/slab: introduce new slab management type, OBJFREELIST_SLAB
Date: Fri, 29 Jan 2016 16:21:30 +0100	[thread overview]
Message-ID: <56AB837A.5090702@suse.cz> (raw)
In-Reply-To: <20160128045128.GC14467@js1304-P5Q-DELUXE>

On 01/28/2016 05:51 AM, Joonsoo Kim wrote:
> On Wed, Jan 27, 2016 at 02:35:04PM +0100, Vlastimil Babka wrote:
>> On 01/14/2016 06:24 AM, Joonsoo Kim wrote:
>> > In fact, I tested another idea implementing OBJFREELIST_SLAB with
>> > extendable linked array through another freed object. It can remove
>> > memory waste completely but it causes more computational overhead
>> > in critical lock path and it seems that overhead outweigh benefit.
>> > So, this patch doesn't include it.
>> 
>> Can you elaborate? Do we actually need an extendable linked array? Why not just
>> store the pointer to the next free object into the object, NULL for the last
>> one? I.e. a singly-linked list. We should never need to actually traverse it?
> 
> As Christoph explained, it's the way SLUB manages freed objects. In SLAB
> case, it doesn't want to touch object itself. It's one of main difference
> between SLAB and SLUB. These objects are cache-cold now so touching object itself
> could cause more cache footprint.

Hm I see. Although I wouldn't bet on whether the now-freed object is more or
less cold than the freelist array itself (regardless of its placement) :)

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/16] mm/slab: introduce new slab management type, OBJFREELIST_SLAB
Date: Fri, 29 Jan 2016 16:21:30 +0100	[thread overview]
Message-ID: <56AB837A.5090702@suse.cz> (raw)
In-Reply-To: <20160128045128.GC14467@js1304-P5Q-DELUXE>

On 01/28/2016 05:51 AM, Joonsoo Kim wrote:
> On Wed, Jan 27, 2016 at 02:35:04PM +0100, Vlastimil Babka wrote:
>> On 01/14/2016 06:24 AM, Joonsoo Kim wrote:
>> > In fact, I tested another idea implementing OBJFREELIST_SLAB with
>> > extendable linked array through another freed object. It can remove
>> > memory waste completely but it causes more computational overhead
>> > in critical lock path and it seems that overhead outweigh benefit.
>> > So, this patch doesn't include it.
>> 
>> Can you elaborate? Do we actually need an extendable linked array? Why not just
>> store the pointer to the next free object into the object, NULL for the last
>> one? I.e. a singly-linked list. We should never need to actually traverse it?
> 
> As Christoph explained, it's the way SLUB manages freed objects. In SLAB
> case, it doesn't want to touch object itself. It's one of main difference
> between SLAB and SLUB. These objects are cache-cold now so touching object itself
> could cause more cache footprint.

Hm I see. Although I wouldn't bet on whether the now-freed object is more or
less cold than the freelist array itself (regardless of its placement) :)

  reply	other threads:[~2016-01-29 15:21 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  5:24 [PATCH 00/16] mm/slab: introduce new freed objects management way, OBJFREELIST_SLAB Joonsoo Kim
2016-01-14  5:24 ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 01/16] mm/slab: fix stale code comment Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 15:22   ` Christoph Lameter
2016-01-14 15:22     ` Christoph Lameter
2016-01-14  5:24 ` [PATCH 02/16] mm/slab: remove useless structure define Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 15:22   ` Christoph Lameter
2016-01-14 15:22     ` Christoph Lameter
2016-01-14  5:24 ` [PATCH 03/16] mm/slab: remove the checks for slab implementation bug Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 15:23   ` Christoph Lameter
2016-01-14 15:23     ` Christoph Lameter
2016-01-14 16:20     ` Joonsoo Kim
2016-01-14 16:20       ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 04/16] mm/slab: activate debug_pagealloc in SLAB when it is actually enabled Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 12:09   ` Jesper Dangaard Brouer
2016-01-14 12:09     ` Jesper Dangaard Brouer
2016-01-14 16:16     ` Joonsoo Kim
2016-01-14 16:16       ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 05/16] mm/slab: use more appropriate condition check for debug_pagealloc Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 06/16] mm/slab: clean-up DEBUG_PAGEALLOC processing code Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 07/16] mm/slab: alternative implementation for DEBUG_SLAB_LEAK Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 08/16] mm/slab: remove object status buffer " Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 09/16] mm/slab: put the freelist at the end of slab page Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 15:26   ` Christoph Lameter
2016-01-14 15:26     ` Christoph Lameter
2016-01-14 16:21     ` Joonsoo Kim
2016-01-14 16:21       ` Joonsoo Kim
2016-01-14 17:13   ` Christoph Lameter
2016-01-14 17:13     ` Christoph Lameter
2016-01-14  5:24 ` [PATCH 10/16] mm/slab: align cache size first before determination of OFF_SLAB candidate Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 11/16] mm/slab: clean-up cache type determination Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 12/16] mm/slab: do not change cache size if debug pagealloc isn't possible Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 13/16] mm/slab: make criteria for off slab determination robust and simple Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 14/16] mm/slab: factor out slab list fixup code Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 15/16] mm/slab: factor out debugging initialization in cache_init_objs() Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14  5:24 ` [PATCH 16/16] mm/slab: introduce new slab management type, OBJFREELIST_SLAB Joonsoo Kim
2016-01-14  5:24   ` Joonsoo Kim
2016-01-14 15:32   ` Christoph Lameter
2016-01-14 15:32     ` Christoph Lameter
2016-01-14 16:24     ` Joonsoo Kim
2016-01-14 16:24       ` Joonsoo Kim
2016-01-27 13:35   ` Vlastimil Babka
2016-01-27 13:35     ` Vlastimil Babka
2016-01-27 16:48     ` Christoph Lameter
2016-01-27 16:48       ` Christoph Lameter
2016-01-27 17:18       ` Vlastimil Babka
2016-01-27 17:18         ` Vlastimil Babka
2016-01-27 17:55         ` Christoph Lameter
2016-01-27 17:55           ` Christoph Lameter
2016-01-28  4:51     ` Joonsoo Kim
2016-01-28  4:51       ` Joonsoo Kim
2016-01-29 15:21       ` Vlastimil Babka [this message]
2016-01-29 15:21         ` Vlastimil Babka
2016-01-27  4:40 ` [PATCH 00/16] mm/slab: introduce new freed objects management way, OBJFREELIST_SLAB Andrew Morton
2016-01-27  4:40   ` Andrew Morton
2016-01-27  4:46   ` Joonsoo Kim
2016-01-27  4:46     ` Joonsoo Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56AB837A.5090702@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.