Re: [00/41] Large Blocksize Support V7 (adds memmap support)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mel Gorman
Date: Friday, September 14, 2007 - 10:42 am

On Fri, 2007-09-14 at 18:10 +0200, Goswin von Brederlow wrote:

No eviction takes place. If an unmovable allocation gets placed in a
movable group, then steps are taken to ensure that future unmovable
allocations will take place in the same range (these decisions take
place in __rmqueue_fallback()). When choosing a movable block to
pollute, it will also choose the lowest possible block in PFN terms to
steal so that fragmentation pollution will be as confined as possible.
Evicting the unmovable pages would be one of those expensive steps that
have been avoided to date.


It would be easier early in the boot to mmap a large area and fault it
in in virtual address order then mlock every a page every 64K. Early in
the systems lifetime, there will be a rough correlation between physical
and virtual memory.

Without mlock(), the most successful attack will like mmap() a 60K
region and fault it in as an attempt to get pagetable pages placed in
every 64K region. This strategy would not work with grouping pages by
mobility though as it would group the pagetable pages together.

Targetted attacks on grouping pages by mobility are not very easy and
not that interesting either. As Nick suggests, the natural fragmentation
over long periods of time is what is interesting.


I believe it's very difficult to craft an attack that will work in a
short period of time. An attack that worked on 2.6.22 as well may have
no success on 2.6.23-rc4-mm1 for example as grouping pages by mobility
does it make it exceedingly hard to craft an attack unless the attacker
can mlock large amounts of memory.


This step in itself is not representative of what happens in the kernel.
The vast vast majority of allocations are order-0. It's a fun analysis
but I'm not sure can we draw any conclusions from it.

Statistical analysis of the buddy algorithm have implied that it doesn't
suffer that badly from external fragmentation but we know in practice
that things are different. A model is hard because minimally the
lifetime of pages varies widely.


I doubt this is how the kernel behaves either.


These type of pictures feel somewhat familiar
(http://www.skynet.ie/~mel/anti-frag/2007-02-28/page_type_distribution.jpg).

-- 
Mel Gorman

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 10, 11:03 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 11, 5:05 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Tue Sep 11, 9:02 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 11, 9:47 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Maxim Levitsky, (Tue Sep 11, 11:25 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 11, 12:20 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:01 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:03 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:07 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:11 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:13 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:41 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 1:42 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 2:35 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 2:41 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 2:48 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 2:52 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 11, 4:26 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 5:00 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 11, 5:04 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Wed Sep 12, 1:20 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Martin J. Bligh, (Wed Sep 12, 7:29 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Wed Sep 12, 4:06 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Wed Sep 12, 4:17 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Thu Sep 13, 7:38 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Fri Sep 14, 9:10 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Mel Gorman, (Fri Sep 14, 10:42 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Fri Sep 14, 10:52 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Fri Sep 14, 11:08 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Fri Sep 14, 11:15 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Fri Sep 14, 5:31 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Fri Sep 14, 5:33 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 15, 5:14 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Sat Sep 15, 8:51 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 15, 1:14 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Sat Sep 15, 3:30 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 6:54 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Sun Sep 16, 8:08 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Linus Torvalds, (Sun Sep 16, 11:15 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Linus Torvalds, (Sun Sep 16, 11:44 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Sun Sep 16, 11:50 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Sun Sep 16, 2:31 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 2:58 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 3:06 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 3:38 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 3:48 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 3:51 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sun Sep 16, 3:56 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 17, 3:00 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 17, 3:03 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 17, 3:05 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 17, 3:10 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 17, 3:21 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Linus Torvalds, (Tue Sep 18, 11:30 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 18, 12:18 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Tue Sep 18, 12:31 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Linus Torvalds, (Tue Sep 18, 12:44 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 18, 1:36 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Tue Sep 18, 1:42 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Wed Sep 19, 7:04 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Thu Sep 20, 7:54 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Thu Sep 20, 11:07 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Thu Sep 20, 11:11 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 22, 10:50 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 22, 11:22 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 22, 11:49 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Goswin von Brederlow, (Sat Sep 22, 11:56 pm)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Andrea Arcangeli, (Mon Sep 24, 8:39 am)
Re: [00/41] Large Blocksize Support V7 (adds memmap support), Christoph Lameter, (Mon Sep 24, 2:13 pm)