Re: the new VMt

2 messages, 2 authors, 2000-09-25 · open the first message on its own page

Re: the new VMt

From: Andrea Arcangeli <hidden>
Date: 2000-09-25 15:41:38

On Mon, Sep 25, 2000 at 04:16:56PM +0100, Alan Cox wrote:
Unless Im missing something here think about this case

2 active processes, no swap

#1					#2
kmalloc 32K				kmalloc 16K
OK					OK
kmalloc 16K				kmalloc 32K
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
block					block
Yep, you're not missing anything. That was my complain about the fact
GFP_KERNEL not failing will obviously dealdock the kernel all over the place.

Ingo's point is that the underlined line won't ever happen in the first place
because of the resource accounting that will tell the upper layer that they
can't try to allocate anything, so they won't enter kmalloc at all. But he's
obviously not talking about 2.4.x. (and I'm not sure if that's the right
way to go in the general case but certainly it's the right way to go for
special cases like skbs with gigabit ethernet)

In 2.4.x GFP_KERNEL not failing is a deadlock as you said.

Andrea
--
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.eu.org/Linux-MM/

Re: the new VMt

From: Ingo Molnar <hidden>
Date: 2000-09-25 16:02:18

On Mon, 25 Sep 2000, Andrea Arcangeli wrote:
Ingo's point is that the underlined line won't ever happen in the
first place
please dont misinterpret my point ...

Frankly, how often do we allocate multi-order pages? I've just made quick
statistics wrt. how allocation orders are distributed on a more or less
typical system:

	(ALLOC ORDER)
	0: 167081
	1: 850
	2: 16
	3: 25
	4: 0
	5: 1
	6: 0
	7: 2
	8: 13
	9: 5

ie. 99.45% of all allocations are single-page! 0.50% is the 8kb
task-structure. The rest is 0.05%.

i'm not talking about 4MB contiguous physical allocations having to
succeed on a 8MB box. I'm talking about 99% of the simple allocation
points not having to worry about a NULL pointer. (not checking for NULL is
one of the most common allocation-related bug that beats low-RAM systems.)

	Ingo


--
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.eu.org/Linux-MM/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help