From: Hugh Dickins <hugh@veritas.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
David Miller <davem@davemloft.net>,
Russell King <rmk+lkml@arm.linux.org.uk>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Containment measures for slab objects on scatter gather lists
Date: Fri, 29 Jun 2007 14:04:15 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0706291339160.10769@blonde.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706282047160.10035@schroedinger.engr.sgi.com>
On Thu, 28 Jun 2007, Christoph Lameter wrote:
> I had a talk with James Bottomley last night and it seems that there is an
> established way of using the page structs of slab objects in the block
> layer. Drivers may use the DMA interfaces to issue control commands. In
> that case they may allocate a short structure via the slab allocator and
> put the control commands into that slab object.
>
> The driver will then perform a sg_init_one() on the slab object.
> sg_init_one() calls sg_set_buf() which determines the page struct of a
> page. In this case sg_set_buf() will determine the page struct of a slab
> object. The dma layer may then perform operations on the "slab page". The
> block layer folks seem to have spend some time to make this work right.
Yes, I don't see why this comes as such a surprise and horror to you,
so much in need of dire WARNINGs. kmalloc memory is not a different
kind of memory from what you get from the page allocators.
I stand by my page_mapping patch, and the remark I made before,
that page_mapping(page) is the correct place to check this. What is
page_mapping(page) for? Precisely to return the struct address_space*
from page->mapping when that's what's in there, and not when that field
has been reused for something else.
So lines like
> + mapping = PageSlab(page) ? NULL : page_mapping(page);
seem to miss the point.
I agree that the only clash found yet has been in flush_dcache_page,
so some bytes and branches can indeed be saved by just doing the
test in there. Oh, but your VM_BUG_ON cancels out that saving.
And if we were to try to save bytes and branches there, it's the
synthetic swapper_space business (only required in a couple of
places) I'd be wanting to cut out.
To me this all seems like a big fuss to excuse your surprise:
so please don't expect an Ack from me; but if others prefer
this, I won't be Nacking. (Though I'll probably whine about
it into eternity ;)
Hugh
next prev parent reply other threads:[~2007-06-29 13:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 4:01 Christoph Lameter
2007-06-29 4:10 ` David Miller
2007-06-29 4:22 ` Christoph Lameter
2007-06-29 4:28 ` David Miller
2007-06-29 4:39 ` Christoph Lameter
2007-06-29 5:06 ` David Miller
2007-06-29 5:24 ` Andrew Morton
2007-06-29 5:37 ` David Miller
2007-06-29 5:45 ` Andrew Morton
2007-06-29 6:51 ` Christoph Lameter
2007-06-29 12:16 ` Alan Cox
2007-06-29 20:45 ` Andrew Morton
2007-06-29 21:14 ` Russell King
2007-06-29 23:11 ` Alan Cox
2007-06-30 7:54 ` Russell King
2007-06-29 22:39 ` Alan Cox
2007-06-29 6:50 ` Christoph Lameter
2007-06-30 8:49 ` Christoph Hellwig
2007-06-29 7:00 ` Christoph Lameter
2007-06-29 9:06 ` David Miller
2007-06-29 13:04 ` Hugh Dickins [this message]
2007-06-29 14:15 ` 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=Pine.LNX.4.64.0706291339160.10769@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®