Re: [PATCH 4/4] add ksm kernel shared memory driver.

Andrew Morton
2009-04-15T22:57:20Z

On Thu, 16 Apr 2009 01:37:25 +0300
Izik Eidus <ieidus@redhat.com> wrote:

> Andrew Morton wrote:
> > On Thu, 9 Apr 2009 06:58:41 +0300
> > Izik Eidus <ieidus@redhat.com> wrote:
> >
> >
> >
> > Confused. In the covering email you indicated that v2 of the patchset
> > had abandoned ioctls and had moved the interface to sysfs.
> >
> We have abandoned the ioctls that control the ksm behavior (how much cpu
> it take, how much kernel pages it may allocate and so on...)
> But we still use ioctls to register the application memory to be used
> with ksm.

hm. ioctls make kernel people weep and gnash teeth.

An appropriate interface would be to add new syscalls. But as ksm is
an optional thing and can even be modprobed, that doesn't work. And
having a driver in mm/ which can be modprobed is kinda neat.

I can't immediately think of a nicer interface. You could always poke
numbers into some pseudo-file but to me that seems as ugly, or uglier
than an ioctl (others seem to disagee).

Ho hum. Please design the ioctl interface so that it doesn't need any
compat handling if poss.