From: Christoph Lameter <cl@linux.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
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, 31 Jul 2015 08:57:35 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.11.1507310845440.11895@east.gentwo.org> (raw)
In-Reply-To: <20150731001827.GA15029@js1304-P5Q-DELUXE>
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.
> I'm wondering what's the meaning of this check "size >=
> kmalloc_size(INDEX_NODE + 1)".
This is pretty old code. IMHO The check is if it fits in the
kmem_cache used for INDEX_NODE. If not then fall back to a page sized
allocation for the cache. Looks like DEBUG_PAGEALLOC wants one page per
object.
--
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>
next prev parent reply other threads:[~2015-07-31 13:57 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 [this message]
2015-08-07 1:56 ` Joonsoo Kim
2015-09-04 20:29 ` Andrew Morton
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=alpine.DEB.2.11.1507310845440.11895@east.gentwo.org \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--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