From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH 4/4] add ksm kernel shared memory driver. Date: Tue, 31 Mar 2009 17:18:45 +0200 Message-ID: <20090331151845.GT9137@random.random> References: <1238457560-7613-3-git-send-email-ieidus@redhat.com> <1238457560-7613-4-git-send-email-ieidus@redhat.com> <1238457560-7613-5-git-send-email-ieidus@redhat.com> <49D17C04.9070307@codemonkey.ws> <49D20B63.8020709@redhat.com> <49D21B33.4070406@codemonkey.ws> <20090331142533.GR9137@random.random> <49D22A9D.4050403@codemonkey.ws> <20090331150218.GS9137@random.random> <49D23224.9000903@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Izik Eidus , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, avi@redhat.com, chrisw@redhat.com, riel@redhat.com, jeremy@goop.org, mtosatti@redhat.com, hugh@veritas.com, corbet@lwn.net, yaniv@redhat.com, dmonakhov@openvz.org To: Anthony Liguori Return-path: Content-Disposition: inline In-Reply-To: <49D23224.9000903@codemonkey.ws> Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org On Tue, Mar 31, 2009 at 10:09:24AM -0500, Anthony Liguori wrote: > I don't think the registering of ram should be done via sysfs. That would > be a pretty bad interface IMHO. But I do think the functionality that > ksmctl provides along with the security issues I mentioned earlier really > suggest that there ought to be a separate API for control vs. registration > and that control API would make a lot of sense as a sysfs API. > > If you wanted to explore alternative APIs for registration, madvise() seems > like the obvious candidate to me. > > madvise(start, size, MADV_SHARABLE) seems like a pretty obvious API to me. madvise to me would sound appropriate, only if ksm would be always-in, which is not the case as it won't even be built if it's configured to N. Besides madvise is sus covered syscall, and this is linux specific detail. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org