[ cc'ing LKML - since this really belongs there ] Original thread on linux-ia64 about supporting alternate root for user level emulators: http://marc.theaimsgroup.com/?t=109708875700003&r=1&w=2 I've reattached the patch here for new readers. On 10/10/2004 3:10 AM, Christoph Hellwig wrote: > On Fri, Oct 08, 2004 at 03:37:10PM -0700, Arun Sharma wrote: >> On 10/8/2004 1:08 AM, David Mosberger wrote: >> >> >Unfortunately, that thread ran out in a rather unhelpful manner, as >> >far as I can see. Rusty seemed to agree that the performance-hit of >> >doing it all in user-level was unacceptably high, but I didn't see any >> >actual numbers. There was a suggestion to decouple the altroot from >> >the personality which makes some sense, but nobody actually did >> >anything about it? >> > >> >> I'd really like this issue to be resolved one way or the other. I'm not >> sure I've heard a convincing argument on why my original patch(which adds a >> new exec domain unconditionally) should not be applied. >> >> I'm fine with the attached patch to set the altroot via a system call as >> well. > > I'd still like to see some number on how much smaller a userland emulation > is. Best using qumu because that's opensource and we simply don't care > about intel's propritary stuff. Else your patch looks pretty okay - but > I'd need to go through linux-kernel and hooking up to all architectures. I've prototyped a generic userland solution that covers just open and stat system calls (for completeness, all path walk related syscalls need to be covered) using the LD_PRELOAD approach. I saw a 16% degradation in system time on this benchmark: find /usr/src/linux -name '*.[chS]' | xargs grep fsck mainly due to the doubling of the number of calls to open. Also, there was a slight increase in user time as well, due to malloc/free overhead. shar file with the benchmark and system call interposer attached. -Arun