Skip to contentSkip to conversation

improved LRU shrink_mmap, kswapd, ...

PATCH New Roger Larsson 1 participant 1 message May 16, 2000

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 improved LRU shrink_mmap, kswapd, ...

Hi all,

As I promised - here is my improved LRU shrink_mmap against pre8.

Tested:

- Can compile a kernel with 'make -j 2'.

Features:

- kswapd, works a little all the time. Thus avoiding situation where all pages are referenced at the same time (ageing).

- kswapd, always ages lru_list before running shrink_mmap.

- shrink_mmap, tries to free more than one page each turn.

- do_try_to_free_pages, uses that to avoid recalls => shrink_mmap is called once per priority level.

- shrink_mmap, does its work with as a fast page finder.

Bugs:

- Does not handle mmap002 correctly.

Needs:

- Additions of other current patches that improves that situation - I tried to keep this clean.

- Tuning...

- More testing - there is a day tomorrow too...

--
Home page:
http://www.norran.net/nra02596/

include/linux/mm.h +1 -0
diff -Naur linux-2.3.99-pre8/include/linux/mm.h linux/include/linux/mm.h
@@ -456,6 +456,7 @@
 extern void remove_inode_page(struct page *);
 extern unsigned long page_unuse(struct page *);
 extern int shrink_mmap(int, int);
+extern int age_mmap(void);
 extern void truncate_inode_pages(struct address_space *, loff_t);
 
 /* generic vm_area_ops exported for stackable file systems */
mm/filemap.c +81 -33

168 lines not on this page · raw message

mm/vmscan.c +36 -13

71 lines not on this page · raw message