From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>, Pekka Enberg <penberg@kernel.org>,
Matt Mackall <mpm@selenic.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC PATCH 6/6] workqueue: use kmalloc_align() instead of hacking
Date: Mon, 26 Mar 2012 10:00:13 +0800 [thread overview]
Message-ID: <4F6FCDAD.4060701@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203210842200.20382@router.home>
On 03/21/2012 09:45 PM, Christoph Lameter wrote:
> On Wed, 21 Mar 2012, Lai Jiangshan wrote:
>
>> Yes, I don't want to build a complex kmalloc_align(). But after I found
>> that SLAB/SLUB's kmalloc-objects are natural/automatic aligned to
>> a proper big power of two. I will do nothing if I introduce kmalloc_align()
>> except just care the debugging.
>
> They are not guaranteed to be aligned to the big power of two! There are
> kmalloc caches that are not power of two. Debugging and other
> necessary meta data may change alignment in both SLAB and SLUB. SLAB needs
> a metadata structure in each page even without debugging that may cause
> alignment issues.
"Debugging and other necessary meta data" are handled in special way in my patches.
(You have already checked the patches.)
Normally, as I said, SLAB/SLUB's kmalloc-objects are natural/automatic aligned,
and my patch does not touch the general cases. Sorry for my bad reply.
>
>> And kmalloc_align() can be used in the following case:
>> o a type object need to be aligned with cache-line for it contains a frequent
>> update-part and a frequent read-part.
>> o The total number of these objects in a given type is not much, creating
>> a new slab cache for a given type will be overkill.
>>
>> This is a RFC patch and it seems mm gurus don't like it. I'm sorry I
>> bother all of you.
>
> Ideas are always welcome. Please do not get offended by our problems with
> your patch.
>
>
>
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-03-26 2:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 10:21 [RFC PATCH 0/6] add kmalloc_align() Lai Jiangshan
2012-03-20 10:21 ` [RFC PATCH 1/6] kenrel.h: add ALIGN_OF_LAST_BIT() Lai Jiangshan
2012-03-20 11:32 ` Michal Nazarewicz
2012-03-20 14:03 ` Alexey Dobriyan
2012-03-20 14:08 ` Christoph Lameter
2012-03-20 14:20 ` Peter Seebach
2012-03-20 10:21 ` [RFC PATCH 2/6] slub: add kmalloc_align() Lai Jiangshan
2012-03-20 14:14 ` Christoph Lameter
2012-03-20 14:21 ` Christoph Lameter
2012-03-20 10:21 ` [RFC PATCH 3/6] slab: " Lai Jiangshan
2012-03-20 10:21 ` [RFC PATCH 4/6] slob: don't couple the header size with the alignment Lai Jiangshan
2012-03-20 10:21 ` [RFC PATCH 5/6] slob: add kmalloc_align() Lai Jiangshan
2012-03-20 10:21 ` [RFC PATCH 6/6] workqueue: use kmalloc_align() instead of hacking Lai Jiangshan
2012-03-20 15:15 ` Christoph Lameter
2012-03-20 15:46 ` Tejun Heo
2012-03-21 3:02 ` Lai Jiangshan
2012-03-21 5:14 ` Tejun Heo
2012-03-21 14:12 ` Patch workqueue: create new slab cache " Christoph Lameter
2012-03-21 14:49 ` Eric Dumazet
2012-03-21 15:03 ` Christoph Lameter
2012-03-21 16:04 ` Eric Dumazet
2012-03-21 17:54 ` Christoph Lameter
2012-03-21 18:05 ` Eric Dumazet
2012-03-21 18:20 ` Christoph Lameter
2012-03-21 16:09 ` Tejun Heo
2012-03-21 17:56 ` Christoph Lameter
2012-03-21 13:45 ` [RFC PATCH 6/6] workqueue: use kmalloc_align() " Christoph Lameter
2012-03-26 2:00 ` Lai Jiangshan [this message]
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=4F6FCDAD.4060701@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
--cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).