All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
To: David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	Pekka Enberg <penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org>
Subject: Re: [PATCH v2] slab+slob: dup name string
Date: Wed, 23 May 2012 13:25:23 +0400	[thread overview]
Message-ID: <4FBCAD03.5010106@parallels.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205222048380.28165-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>

On 05/23/2012 07:55 AM, David Rientjes wrote:
> I hate consistency patches like this because it could potentially fail a
> kmem_cache_create() from a sufficiently long cache name when it wouldn't
> have before, but I'm not really concerned since kmem_cache_create() will
> naturally be followed by kmem_cache_alloc() which is more likely to cause
> the oom anyway.  But it's just another waste of memory for consistency
> sake.
>
> This is much easier to do, just statically allocate the const char *'s
> needed for the boot caches and then set their ->name's manually in
> kmem_cache_init() and then avoid the kfree() in kmem_cache_destroy() if
> the name is between&boot_cache_name[0] and&boot_cache_name[n].

That can be done.

I'll also revisit my memcg patches to see if I can rework it so it 
doesn't care about this particular behavior. We're having a surprisingly 
difficult time reaching consensus on this, so maybe it would be better 
left untouched (if there is a way that makes sense to)

WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	linux-mm@kvack.org, Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH v2] slab+slob: dup name string
Date: Wed, 23 May 2012 13:25:23 +0400	[thread overview]
Message-ID: <4FBCAD03.5010106@parallels.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205222048380.28165@chino.kir.corp.google.com>

On 05/23/2012 07:55 AM, David Rientjes wrote:
> I hate consistency patches like this because it could potentially fail a
> kmem_cache_create() from a sufficiently long cache name when it wouldn't
> have before, but I'm not really concerned since kmem_cache_create() will
> naturally be followed by kmem_cache_alloc() which is more likely to cause
> the oom anyway.  But it's just another waste of memory for consistency
> sake.
>
> This is much easier to do, just statically allocate the const char *'s
> needed for the boot caches and then set their ->name's manually in
> kmem_cache_init() and then avoid the kfree() in kmem_cache_destroy() if
> the name is between&boot_cache_name[0] and&boot_cache_name[n].

That can be done.

I'll also revisit my memcg patches to see if I can rework it so it 
doesn't care about this particular behavior. We're having a surprisingly 
difficult time reaching consensus on this, so maybe it would be better 
left untouched (if there is a way that makes sense to)

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>, <linux-kernel@vger.kernel.org>,
	<cgroups@vger.kernel.org>, <linux-mm@kvack.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH v2] slab+slob: dup name string
Date: Wed, 23 May 2012 13:25:23 +0400	[thread overview]
Message-ID: <4FBCAD03.5010106@parallels.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205222048380.28165@chino.kir.corp.google.com>

On 05/23/2012 07:55 AM, David Rientjes wrote:
> I hate consistency patches like this because it could potentially fail a
> kmem_cache_create() from a sufficiently long cache name when it wouldn't
> have before, but I'm not really concerned since kmem_cache_create() will
> naturally be followed by kmem_cache_alloc() which is more likely to cause
> the oom anyway.  But it's just another waste of memory for consistency
> sake.
>
> This is much easier to do, just statically allocate the const char *'s
> needed for the boot caches and then set their ->name's manually in
> kmem_cache_init() and then avoid the kfree() in kmem_cache_destroy() if
> the name is between&boot_cache_name[0] and&boot_cache_name[n].

That can be done.

I'll also revisit my memcg patches to see if I can rework it so it 
doesn't care about this particular behavior. We're having a surprisingly 
difficult time reaching consensus on this, so maybe it would be better 
left untouched (if there is a way that makes sense to)

  parent reply	other threads:[~2012-05-23  9:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22  9:51 [PATCH v2] slab+slob: dup name string Glauber Costa
2012-05-22  9:51 ` Glauber Costa
2012-05-22  9:51 ` Glauber Costa
2012-05-22 13:58 ` Christoph Lameter
2012-05-22 13:58   ` Christoph Lameter
     [not found]   ` <alpine.DEB.2.00.1205220857380.17600-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2012-05-22 15:27     ` Glauber Costa
2012-05-22 15:27       ` Glauber Costa
2012-05-22 15:27       ` Glauber Costa
2012-05-22 17:18       ` Christoph Lameter
2012-05-22 17:18         ` Christoph Lameter
2012-05-23  3:55     ` David Rientjes
2012-05-23  3:55       ` David Rientjes
2012-05-23  3:55       ` David Rientjes
     [not found]       ` <alpine.DEB.2.00.1205222048380.28165-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2012-05-23  9:25         ` Glauber Costa [this message]
2012-05-23  9:25           ` Glauber Costa
2012-05-23  9:25           ` Glauber Costa
2012-05-23 13:53         ` Christoph Lameter
2012-05-23 13:53           ` Christoph Lameter
2012-05-23 13:53           ` Christoph Lameter
2012-05-24  1:01           ` David Rientjes
2012-05-24  1:01             ` David Rientjes

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=4FBCAD03.5010106@parallels.com \
    --to=glommer-bzqdu9zft3wakbo8gow8eq@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org \
    --cc=rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.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.