Re: Execute in place

From: Hugh Dickins
Date: Wed May 02 2007 - 11:23:19 EST


On Wed, 2 May 2007, BjÃrn Steinbrink wrote:
> On 2007.05.02 15:04:44 +0100, Hugh Dickins wrote:
> > On Tue, 1 May 2007, Phillip Susi wrote:
> > > I seem to remember seeing some patches go by at some point that
> > > allowed one of the rom type embeded system filesystems to directly
> > > execute binaries out of the original rom memory rather than copying
> > > them to ram first, then executing from there. I was wondering if
> > > rootfs or tmpfs support such execute in place today, or if binaries
> > > executed from there have their code segments duplicated in ram?
> >
> > Only ext2 supports it today: see Documentation/filesystems/xip.txt
>
> As I understand it, xip avoids the page cache copy. But tmpfs already
> lives in the page cache (or swap), so avoiding that "copy" is
> impossible. But I always expected tmpfs to implicitly due its own kind
> of xip, i.e. that it doesn't have to store its stuff in the page cache
> twice. Are you saying that this isn't true?

tmpfs doesn't store its stuff in the page cache twice: that's true,
and I didn't mean to imply otherwise. But tmpfs doesn't contain any
support for rom memory: you'd have to copy from rom to tmpfs to use it.

Hugh