From: Pekka Enberg <penberg@kernel.org>
To: Christoph Lameter <cl@linux.com>
Cc: Jonathan Brassow <jbrassow@redhat.com>,
linux-raid@vger.kernel.org,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] Problems with RAID 4/5/6 and kmem_cache
Date: Sat, 28 Sep 2013 09:49:56 +0300 [thread overview]
Message-ID: <CAOJsxLGaNe_cap7fx8ZRZPWqkQhUbpA07Qhtgsg_+c5JdgV=qQ@mail.gmail.com> (raw)
In-Reply-To: <0000014142863060-919062ff-7284-445d-b3ec-f38cc8d5a6c8-000000@email.amazonses.com>
On Sun, Sep 22, 2013 at 12:56 AM, Christoph Lameter <cl@linux.com> wrote:
> On Thu, 19 Sep 2013, Jonathan Brassow wrote:
>
>> 4) kmem_cache_create(name="foo-a")
>> - This FAILS because kmem_cache_sanity_check colides with the existing
>> name ("foo-a") associated with the non-removed cache.
>
> That should not happen. breakage you see will result. Oh. I see the move
> to common code resulted in the SLAB checks being used for SLUB.
>
> The following patch should fix this.
>
> Subject: slab_common: Do not check for duplicate slab names
>
> SLUB can alias multiple slab kmem_create_requests to one slab cache
> to save memory and increase the cache hotness. As a result the name
> of the slab can be stale. Only check the name for duplicates if we are
> in debug mode where we do not merge multiple caches.
>
> Signed-off-by: Christoph Lameter <cl@linux.com>
>
> Index: linux/mm/slab_common.c
> ===================================================================
> --- linux.orig/mm/slab_common.c 2013-09-20 11:49:13.052208294 -0500
> +++ linux/mm/slab_common.c 2013-09-21 16:55:23.097131481 -0500
> @@ -56,6 +56,7 @@
> continue;
> }
>
> +#if !defined(CONFIG_SLUB) || !defined(CONFIG_SLUB_DEBUG_ON)
> /*
> * For simplicity, we won't check this in the list of memcg
> * caches. We have control over memcg naming, and if there
> @@ -69,6 +70,7 @@
> s = NULL;
> return -EINVAL;
> }
> +#endif
> }
>
> WARN_ON(strchr(name, ' ')); /* It confuses parsers */
Applied to slab/urgent, thanks!
Do we need to come up with something less #ifdeffy for v3.13?
--
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:[~2013-09-28 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 3:15 Jonathan Brassow
2013-09-20 3:16 ` [PATCH] RAID5: Change kmem_cache name string of RAID 4/5/6 stripe cache Jonathan Brassow
2013-10-10 22:50 ` H. Peter Anvin
2013-10-11 2:37 ` Brassow Jonathan
2013-09-21 21:56 ` [PATCH] Problems with RAID 4/5/6 and kmem_cache Christoph Lameter
2013-09-28 6:49 ` Pekka Enberg [this message]
2013-10-02 14:43 ` 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='CAOJsxLGaNe_cap7fx8ZRZPWqkQhUbpA07Qhtgsg_+c5JdgV=qQ@mail.gmail.com' \
--to=penberg@kernel.org \
--cc=cl@linux.com \
--cc=jbrassow@redhat.com \
--cc=linux-mm@kvack.org \
--cc=linux-raid@vger.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