linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Matt Mackall <mpm@selenic.com>
Cc: Christoph Lameter <clameter@sgi.com>,
	David Howells <dhowells@redhat.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-mm@kvack.org
Subject: Re: [PATCH] nommu: Push kobjsize() slab-specific logic down to ksize().
Date: Wed, 21 May 2008 10:19:25 +0900	[thread overview]
Message-ID: <20080521011925.GB24455@linux-sh.org> (raw)
In-Reply-To: <1211318557.18026.215.camel@calx>

On Tue, May 20, 2008 at 04:22:37PM -0500, Matt Mackall wrote:
> On Tue, 2008-05-20 at 12:16 -0700, Christoph Lameter wrote:
> > On Tue, 20 May 2008, Matt Mackall wrote:
> > > > How would that work given that both SLUB and SLOB forward >4k allocs to 
> > > > the page allocator? So any compound page allocation may be a slab 
> > > > allocation. Is there some way to distinguish between a 
> > > > allocations of the page allocator and a slab alloc?
> > > 
> > > We can't do it at all for SLOB. But when debugging is turned on, we can
> > > notice (in SLAB and SLUB) whenever anyone asks for the ksize() of
> > > something that lives on a non-kmalloc slab.
> > 
> > We could mark the pages specially I guess. Add a slab flag for 
> > kmalloc? PageSlab and PageKmalloc?
> 
> No, just warn for the cases where we already have enough information.
> 
If we go in that direction the existing users are already going to
trigger this a lot (ie, commit 4016a1390d07f15b267eecb20e76a48fd5c524ef).
Without this sort of heuristic in place, simply killing off kobjsize()
and calling in to ksize() directly would be a reasonable option.

Having WARN_ON()'s for !PageSlab() pages in ksize() in SLAB/SLUB would
make these cases more visible, at least.

--
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:[~2008-05-21  1:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20  9:59 Paul Mundt
2008-05-20 15:18 ` David Howells
2008-05-20 16:52   ` Christoph Lameter
2008-05-20 18:23     ` Matt Mackall
2008-05-20 18:51       ` Christoph Lameter
2008-05-20 19:00         ` Matt Mackall
2008-05-20 19:08           ` Christoph Lameter
2008-05-20 19:14             ` Matt Mackall
2008-05-20 19:16               ` Christoph Lameter
2008-05-20 21:22                 ` Matt Mackall
2008-05-21  1:19                   ` Paul Mundt [this message]
2008-05-21  1:52                     ` Christoph Lameter
2008-05-22  4:23     ` Pekka Enberg
2008-05-20 16:29 ` Matt Mackall
2008-05-21  2:43   ` Paul Mundt
2008-05-21 14:58 ` Pekka Enberg
2008-05-21 15:06   ` Matt Mackall
2008-05-21 17:13 ` Pekka J Enberg
2008-05-21 17:27   ` Christoph Lameter
2008-05-21 19:08   ` Pekka Enberg
2008-05-21 23:43   ` Paul Mundt
2008-05-22  0:01     ` 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=20080521011925.GB24455@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=clameter@sgi.com \
    --cc=dhowells@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@cs.helsinki.fi \
    /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