[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.
Hi, Andrea.

On Wed, 6 May 2009 16:56:42 +0200
Andrea Arcangeli <> wrote:

> On Wed, May 06, 2009 at 03:46:31PM +0100, Hugh Dickins wrote:
> > As I understand it, KSM won't affect the vm_overcommit behaviour at all.
> In short vm_overcommit is a virtual thing, KSM only makes virtual
> takes less physical than before. One issue in KSM that was mentioned
> was the cgroup accounting if you merge two pages in different groups
> but that is kind of a corner case and it'll be handled "somehow" :)
> > The only difference would be in how much memory (mostly lowmem)
> > KSM's own data structures will take up - as usual, the kernel
> > data structures aren't being accounted, but do take up memory.
> Oh yeah, on 32bit systems that would be a problem... That lowmem is
> taken for eacy virtual address scanned. One more reason to still allow
> ksm to all users only selectively through chown/chmod with ioctl or
> sysfs permissions with syscall/madvise. Luckily most systems where ksm
> is used are 64bit. We don't plan to kmap_atomic around the
> rmap_item/tree_item. No ram is allocated in the holes though, so if

Hmm. Don't you consider 32-bit system ?

Jared siad, it's also good in embedded system. (but I don't know well his testing environement).
Many embedded system is so I/O bouneded that we can use much CPU time in there.
I hope this feature will help saving memory in embedded system.

One more thing about interface.

Ksm map regions are dynamic characteritic ?
I mean sometime A application calls ioctl(0x800000, 0x10000) and sometime it calls ioctl(0xb7000000, 0x20000);
Of course, It depends on application's behavior.

For using this feature now, we have to add ioctl and recompile applications.
It means we have to know application internal well and to need source code.
It would prevent various experiements and easy use.

I want to use this feature without appliation internal knowledge easily.
Maybe it can be useless without appliation behavior knowledge.
But it will help various application experiments without much knowledge of application and recompile.

ex) echo 'pid 0x8050000 0x100000' > sysfs or procfs or cgroup.

Personally, I support cgroup interface but don't have a good idea now.
It can help fork-like application and we can group same address of KSM range among tasks.

> there's not a real anonymous page allocated the rmap_item will not be
> allocated either (without requiring pending update ;).
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to For more info on Linux MM,
> see: .
> Don't email: <a href=mailto:""> </a>

Kinds Regards
Minchan Kim

 \ /
  Last update: 2009-05-07 01:59    [W:0.050 / U:17.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site