[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/6] ksm: dont allow overlap memory addresses registrations.
Hugh Dickins wrote:
> On Wed, 6 May 2009, Andrea Arcangeli wrote:
>> For example for the swapping of KSM pages we've been thinking of using
>> external rmap hooks to avoid the VM to know anything specific to KSM
>> pages but to still allow their unmapping and swap.
> There may prove to be various reasons why it wouldn't work out in practice;
> but when thinking of swapping them, it is worth considering if those KSM
> pages can just be assigned to a tmpfs file, then leave the swapping to that.
> Hugh

The problem here (as i see it) is reverse mapping for this vmas that
point into the shared page.
Right now linux use the ->index to find this pages and then unpresent
But even if we move into allocating them inside tmpfs, who will know how
to unpresent the virtual addresses when we want to swap the page?

I had old patch that did that extrnal rmap thing, it added few callbacks
inside rmap.c (you had AnonPage FilePage and ExtRmapPage) and if any
driver wanted to mangae the reverse mapping by itself it would just
marked the pages as ExtRmapPages and will then tell the
try_to_unmap_one() the virtual address it need to unmap...

As far as i remember it required some small changes into memory.c

 \ /
  Last update: 2009-05-06 16:09    [W:0.061 / U:6.772 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site