page ageing with lists
Subsystems (6)
PATCH 1/1 page ageing with lists
Hi,
This is a patch with page ageing for 2.4.0-test4-pre1.
Performance, unoptimized filesystem:
* streamed write is as good as 2.2.14
* streamed copy is 3/4 of 2.2.14
* streamed read is close to 2.2.14
Potential problems:
* Got a BUG mm.h:321 while running this patch,
unrelated? (more about this in another email)
Features:
* does NOT add any field in page structure.
* round robin lists is used to simulate ageing.
* referenced pages are moved 2 steps forward.
* multi used paged are moved 4 steps forward.
* non free able, tryagain, are moved 1 steps forward.
* new pages are inserted 3 steps forward.
* no pages are moved backward or to currently scanned. and new in this release:
* pages failing zone test are moved to a list per zone. This lists are searched first!
* removed one unnecessary cause for SetPageReferenced
Future work:
* trim offsets / size / priority
* remove code that unnecessary sets page as referenced (Riel?)
* split pagemap_lru_lock (if wanted on SMP)
* move pages of zones with pressure less forward...
* ...
additional idea:
* periodically check pages for referenced - move forward.
/RogerL
--
Home page:
http://www.norran.net/nra02596/
mm/page_alloc.c renamed from mm/page_alloc.c.orig +6 -1
@@ -516,7 +516,7 @@ void __init free_area_init_core(int nid, freepages.min += i; freepages.low += i *2 ; freepages.high += i *3 ; -memlist_init (&lru_cache); +init_lru_cache ();/* * Some architectures (with lots of mem and discontinous memory
@@ -562,6 +562,11 @@ void __init free_area_init_core(int nid, zone->lock =SPIN_LOCK_UNLOCKED ; zone->zone_pgdat = pgdat; zone->free_pages =0 ; + +memlist_init (&zone->lru_cache[0 ]); +memlist_init (&zone->lru_cache[1 ]); + zone->lru_insert =0 ; +if (!size)continue ;
mm/filemap.c renamed from mm/filemap.c.orig +214 -21
316 lines not on this page · raw message
include/linux/mm.h renamed from include/linux/mm.h.orig +2 -1
@@ -15,7 +15,7 @@ extern unsigned long max_mapnr;extern unsigned long num_physpages;extern void * high_memory;extern int page_cluster; -extern struct list_head lru_cache; +extern struct list_head *lru_cache_insert;#include <asm/page.h> #include <asm/pgtable.h>
@@ -456,6 +456,7 @@ struct zone_t;/* filemap.c */ extern void remove_inode_page (struct page *);extern unsigned long page_unuse (struct page *); +extern void init_lru_cache (void );extern int shrink_mmap (int ,int );extern void truncate_inode_pages (struct address_space *,loff_t );
include/linux/swap.h renamed from include/linux/swap.h.orig +1 -1
@@ -166,7 +166,7 @@ extern spinlock_t pagemap_lru_lock;#define lru_cache_add (page) \ do { \ spin_lock(&pagemap_lru_lock); \ - list_add(&(page)->lru, &lru_cache); \ + list_add(&(page)->lru, lru_cache_insert); \ nr_lru_pages++; \ spin_unlock(&pagemap_lru_lock); \ } while (0)
include/linux/mmzone.h renamed from include/linux/mmzone.h.orig +6 -0
@@ -32,6 +32,12 @@ typedef struct zone_struct {char zone_wake_kswapd;unsigned long pages_min, pages_low, pages_high; +/* +* zone lru - really old pages +*/ +int lru_insert; +struct list_head lru_cache[2 ]; +/* * free areas of different sizes */
Quoted 8 lines · Roger Larsson
Hi,
This is a patch with page ageing for 2.4.0-test4-pre1.
Performance, unoptimized filesystem:
* streamed write is as good as 2.2.14
* streamed copy is 3/4 of 2.2.14
* streamed read is close to 2.2.14
Has anyone tested 2.4.0-test4-pre4 without any patches?
And shouldn't (in particular) streamed write be faster than 2.2 on account of the unified buffer cache in 2.3?
Cheers
Chris
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/