linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Christoph Lameter <cl@linux.com>,
	liu.hailong6@zte.com.cn, Pekka Enberg <penberg@kernel.org>,
	linux-mm@kvack.org, jiang.xuexin@zte.com.cn,
	David Rientjes <rientjes@google.com>
Subject: Re: slab:Fix the unexpected index mapping result of kmalloc_size(INDEX_NODE + 1)
Date: Fri, 4 Sep 2015 13:29:02 -0700	[thread overview]
Message-ID: <20150904132902.5d62a09077435d742d6f2f1b@linux-foundation.org> (raw)
In-Reply-To: <20150807015609.GB15802@js1304-P5Q-DELUXE>

On Fri, 7 Aug 2015 10:56:09 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:

> On Fri, Jul 31, 2015 at 08:57:35AM -0500, Christoph Lameter wrote:
> > On Fri, 31 Jul 2015, Joonsoo Kim wrote:
> > 
> > > I don't think that this fix is right.
> > > Just "kmalloc_size(INDEX_NODE) * 2" looks insane because it means 192 * 2
> > > = 384 on his platform. Why we need to check size is larger than 384?
> > 
> > Its an arbitrary boundary. Making it large ensures that the smaller caches
> > stay operational and do not fall back to page sized allocations.
> 
> If it is an arbitrary boundary, it would be better to use static value
> such as "256" rather than kmalloc_size(INDEX_NODE) * 2.
> Value of kmalloc_size(INDEX_NODE) * 2 can be different in some archs
> and it is difficult to manage such variation. It would cause this kinds of
> bug again. I recommand following change. How about it?
> 
> -       if (size >= kmalloc_size(INDEX_NODE + 1)
> +       if (!slab_early_init &&
> +               size >= kmalloc_size(INDEX_NODE) &&
> +               size >= 256
> 

Guys, can we please finish this off?  afaict Jianxuexin's original
patch is considered undesirable, but his machine is still going BUG.


--
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:[~2015-09-04 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  5:56 liu.hailong6
2015-07-29 22:28 ` Andrew Morton
2015-07-30 16:29   ` Christoph Lameter
2015-07-31  0:18   ` Joonsoo Kim
2015-07-31 13:57     ` Christoph Lameter
2015-08-07  1:56       ` Joonsoo Kim
2015-09-04 20:29         ` Andrew Morton [this message]
2015-09-07  5:38           ` Joonsoo Kim
2015-09-08 17:49             ` Christoph Lameter
2015-09-11 14:32               ` Joonsoo Kim
2015-09-11 14:49                 ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2015-07-09  3:35 liu.hailong6

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=20150904132902.5d62a09077435d742d6f2f1b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jiang.xuexin@zte.com.cn \
    --cc=linux-mm@kvack.org \
    --cc=liu.hailong6@zte.com.cn \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox