All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave@sr71.net>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	penberg@kernel.org, cl@linux-foundation.org
Subject: Re: [PATCH 0/9] re-shrink 'struct page' when SLUB is on.
Date: Mon, 6 Jan 2014 13:32:37 +0900	[thread overview]
Message-ID: <20140106043237.GE696@lge.com> (raw)
In-Reply-To: <20140103141816.20ef2a24c8adffae040e53dc@linux-foundation.org>

On Fri, Jan 03, 2014 at 02:18:16PM -0800, Andrew Morton wrote:
> On Fri, 03 Jan 2014 10:01:47 -0800 Dave Hansen <dave@sr71.net> wrote:
> 
> > This is a minor update from the last version.  The most notable
> > thing is that I was able to demonstrate that maintaining the
> > cmpxchg16 optimization has _some_ value.
> > 
> > Otherwise, the code changes are just a few minor cleanups.
> > 
> > ---
> > 
> > SLUB depends on a 16-byte cmpxchg for an optimization which
> > allows it to not disable interrupts in its fast path.  This
> > optimization has some small but measurable benefits:
> > 
> > 	http://lkml.kernel.org/r/52B345A3.6090700@sr71.net
> 
> So really the only significant benefit from the cmpxchg16 is with
> cache-cold eight-byte kmalloc/kfree?  8% faster in this case?  But with
> cache-hot kmalloc/kfree the benefit of cmpxchg16 is precisely zero.

Hello,

I guess that cmpxchg16 is not used in this cache-hot kmalloc/kfree test,
because kfree would be done in free fast-path. In this case,
this_cpu_cmpxchg_double() would be called, so you cannot find any effect
of cmpxchg16.

Thanks.

> 
> This is really weird and makes me suspect a measurement glitch.
> 
> Even if this 8% is real, it's unclear that it's worth all the
> complexity the cmpxchg16 adds.
> 
> It would be really useful (hint :)) if we were to know exactly where
> that 8% is coming from - perhaps it's something which is not directly
> related to the cmpxchg16, and we can fix it separately.
> 
> 
> --
> 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>

--
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: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave@sr71.net>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	penberg@kernel.org, cl@linux-foundation.org
Subject: Re: [PATCH 0/9] re-shrink 'struct page' when SLUB is on.
Date: Mon, 6 Jan 2014 13:32:37 +0900	[thread overview]
Message-ID: <20140106043237.GE696@lge.com> (raw)
In-Reply-To: <20140103141816.20ef2a24c8adffae040e53dc@linux-foundation.org>

On Fri, Jan 03, 2014 at 02:18:16PM -0800, Andrew Morton wrote:
> On Fri, 03 Jan 2014 10:01:47 -0800 Dave Hansen <dave@sr71.net> wrote:
> 
> > This is a minor update from the last version.  The most notable
> > thing is that I was able to demonstrate that maintaining the
> > cmpxchg16 optimization has _some_ value.
> > 
> > Otherwise, the code changes are just a few minor cleanups.
> > 
> > ---
> > 
> > SLUB depends on a 16-byte cmpxchg for an optimization which
> > allows it to not disable interrupts in its fast path.  This
> > optimization has some small but measurable benefits:
> > 
> > 	http://lkml.kernel.org/r/52B345A3.6090700@sr71.net
> 
> So really the only significant benefit from the cmpxchg16 is with
> cache-cold eight-byte kmalloc/kfree?  8% faster in this case?  But with
> cache-hot kmalloc/kfree the benefit of cmpxchg16 is precisely zero.

Hello,

I guess that cmpxchg16 is not used in this cache-hot kmalloc/kfree test,
because kfree would be done in free fast-path. In this case,
this_cpu_cmpxchg_double() would be called, so you cannot find any effect
of cmpxchg16.

Thanks.

> 
> This is really weird and makes me suspect a measurement glitch.
> 
> Even if this 8% is real, it's unclear that it's worth all the
> complexity the cmpxchg16 adds.
> 
> It would be really useful (hint :)) if we were to know exactly where
> that 8% is coming from - perhaps it's something which is not directly
> related to the cmpxchg16, and we can fix it separately.
> 
> 
> --
> 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>

  reply	other threads:[~2014-01-06  4:32 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 18:01 [PATCH 0/9] re-shrink 'struct page' when SLUB is on Dave Hansen
2014-01-03 18:01 ` [PATCH 1/9] mm: slab/slub: use page->list consistently instead of page->lru Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:01 ` [PATCH 2/9] mm: blk-mq: uses page->list incorrectly Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:01 ` [PATCH 3/9] mm: page->pfmemalloc only used by slab/skb Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:01 ` [PATCH 4/9] mm: slabs: reset page at free Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:01 ` [PATCH 5/9] mm: rearrange struct page Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:01 ` [PATCH 6/9] mm: slub: rearrange 'struct page' fields Dave Hansen
2014-01-03 18:01   ` Dave Hansen
2014-01-03 18:02 ` [PATCH 7/9] mm: slub: abstract out double cmpxchg option Dave Hansen
2014-01-03 18:02   ` Dave Hansen
2014-01-03 18:02 ` [PATCH 8/9] mm: slub: remove 'struct page' alignment restrictions Dave Hansen
2014-01-03 18:02   ` Dave Hansen
2014-01-03 18:02 ` [PATCH 9/9] mm: slub: cleanups after code churn Dave Hansen
2014-01-03 18:02   ` Dave Hansen
2014-01-03 22:18 ` [PATCH 0/9] re-shrink 'struct page' when SLUB is on Andrew Morton
2014-01-03 22:18   ` Andrew Morton
2014-01-06  4:32   ` Joonsoo Kim [this message]
2014-01-06  4:32     ` Joonsoo Kim
2014-01-10 20:52     ` Dave Hansen
2014-01-10 20:52       ` Dave Hansen
2014-01-10 23:39       ` Andrew Morton
2014-01-10 23:39         ` Andrew Morton
2014-01-10 23:42         ` Dave Hansen
2014-01-10 23:42           ` Dave Hansen
2014-01-11  9:26           ` Pekka Enberg
2014-01-11  9:26             ` Pekka Enberg
2014-01-12  0:55             ` Christoph Lameter
2014-01-12  0:55               ` Christoph Lameter
2014-01-13  1:44               ` Joonsoo Kim
2014-01-13  1:44                 ` Joonsoo Kim
2014-01-13  3:36                 ` Davidlohr Bueso
2014-01-13  3:36                   ` Davidlohr Bueso
2014-01-13 13:46                   ` Fengguang Wu
2014-01-13 13:46                     ` Fengguang Wu
2014-01-13 15:42                     ` Dave Hansen
2014-01-13 15:42                       ` Dave Hansen
2014-01-13 17:16                 ` Dave Hansen
2014-01-13 17:16                   ` Dave Hansen
2014-01-14 20:07                   ` Christoph Lameter
2014-01-14 20:07                     ` Christoph Lameter
2014-01-14 22:05                     ` Dave Hansen
2014-01-14 22:05                       ` Dave Hansen
2014-01-16 16:44                       ` Christoph Lameter
2014-01-16 16:44                         ` Christoph Lameter
2014-01-16 17:08                         ` Dave Hansen
2014-01-16 17:08                           ` Dave Hansen
2014-01-16 18:26                           ` Christoph Lameter
2014-01-16 18:26                             ` Christoph Lameter
2014-01-14 17:40               ` Christoph Lameter
2014-01-14 17:40                 ` Christoph Lameter

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=20140106043237.GE696@lge.com \
    --to=iamjoonsoo.kim@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=dave@sr71.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    /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.