Re: [PATCH] Containment measures for slab objects on scatter gatherlists

From: Andrew Morton
Date: Fri Jun 29 2007 - 01:24:54 EST


On Thu, 28 Jun 2007 22:06:06 -0700 (PDT) David Miller <davem@xxxxxxxxxxxxx> wrote:

> From: Christoph Lameter <clameter@xxxxxxx>
> Date: Thu, 28 Jun 2007 21:39:01 -0700 (PDT)
>
> > Hmmmm... Maybe we are creating more of a mess with this. Isnt there some
> > other way to handle these object.
>
> That's where I was going with the silly idea to use another
> allocator :)
>
> Really, it would be great if we could treat kmalloc() objects
> just like real pages.

>From a high level, that seems like a bad idea. kmalloc() gives you a
virtual address and you really shouldn't be poking around at that memory's
underlying page's pageframe metadata.

However we can of course do tasteless and weird things if the benefit is
sufficient....

> Everything wants to do I/O on pages
> but sometimes (like the networking) you have a kmalloc
> chunk which is technically just a part of a page.

hm. So what happens when two quite different threads of control are doing
IO against two hunks of kmalloced memory which happen to come from the same
page? Either some (kernel-wide) locking is needed, or that pageframe needs
to be treated as readonly?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/