LKML Archive on
help / color / mirror / Atom feed
From: Christoph Lameter <>
To: Pekka J Enberg <>
Subject: Re: [PATCH] slab: remove colouroff from struct slab
Date: Fri, 23 Feb 2007 06:00:37 -0800 (PST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <Pine.LNX.4.64.0702221436460.14523@sbz-30.cs.Helsinki.FI>

On Thu, 22 Feb 2007, Pekka J Enberg wrote:

> As the color offset is always within the first page of the slab,
> virt_to_page() works just fine without slabp->colouroff.

True but then we pass an address to kmem_freepages that is not the start 
of the page. kmem_freepages will then in turn call free_pages() with an 
address that is not the start of a page. free_pages() will then do another 
virt_to_page() which ignored the offset into the page again. And so the 
approach works but an uneasy feeling remains since the address we got from 
kmem_getpages() is different from what we pass to kmem_freepages().

Could you think about a way to do this in a cleaner way? Maybe use a 
struct page * in both kmem_get/freepages? Or add some comment explaining 
the situation?

  reply	other threads:[~2007-02-23 14:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 12:37 Pekka J Enberg
2007-02-23 14:00 ` Christoph Lameter [this message]
2007-03-02  7:14 ` Andrew Morton

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] slab: remove colouroff from struct slab' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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