Hi Rik, Here is my first proposal for changing shm to be integrated into shrink_mmap. It gives you a function 'int shm_write_swap (struct page *page)' to write out a page to swap and replace the pte in the shm structures. I tested the stuff with no swapping and it seems stable so far. But shm_write_swap is completely untested. It probably needs to add the pages in shm_nopage_core to your lru queues and of course it needs the calls from shrink_mmap. I think it would be nicer to only have a notify function instead of shm_write_swap, which gets the page and the swap_entry and can simply put the swap_entry into the shm structures without handling the swapping at all. What do you think? Christoph