···58585959nobh Do not attach buffer_heads to file pagecache.60606161+xip Use execute in place (no caching) if possible6262+6163grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2.62646365
+67
Documentation/filesystems/xip.txt
···11+Execute-in-place for file mappings22+----------------------------------33+44+Motivation55+----------66+File mappings are performed by mapping page cache pages to userspace. In77+addition, read&write type file operations also transfer data from/to the page88+cache.99+1010+For memory backed storage devices that use the block device interface, the page1111+cache pages are in fact copies of the original storage. Various approaches1212+exist to work around the need for an extra copy. The ramdisk driver for example1313+does read the data into the page cache, keeps a reference, and discards the1414+original data behind later on.1515+1616+Execute-in-place solves this issue the other way around: instead of keeping1717+data in the page cache, the need to have a page cache copy is eliminated1818+completely. With execute-in-place, read&write type operations are performed1919+directly from/to the memory backed storage device. For file mappings, the2020+storage device itself is mapped directly into userspace.2121+2222+This implementation was initialy written for shared memory segments between2323+different virtual machines on s390 hardware to allow multiple machines to2424+share the same binaries and libraries.2525+2626+Implementation2727+--------------2828+Execute-in-place is implemented in three steps: block device operation,2929+address space operation, and file operations.3030+3131+A block device operation named direct_access is used to retrieve a3232+reference (pointer) to a block on-disk. The reference is supposed to be3333+cpu-addressable, physical address and remain valid until the release operation3434+is performed. A struct block_device reference is used to address the device,3535+and a sector_t argument is used to identify the individual block. As an3636+alternative, memory technology devices can be used for this.3737+3838+The block device operation is optional, these block devices support it as of3939+today:4040+- dcssblk: s390 dcss block device driver4141+4242+An address space operation named get_xip_page is used to retrieve reference4343+to a struct page. To address the target page, a reference to an address_space,4444+and a sector number is provided. A 3rd argument indicates whether the4545+function should allocate blocks if needed.4646+4747+This address space operation is mutually exclusive with readpage&writepage that4848+do page cache read/write operations.4949+The following filesystems support it as of today:5050+- ext2: the second extended filesystem, see Documentation/filesystems/ext2.txt5151+5252+A set of file operations that do utilize get_xip_page can be found in5353+mm/filemap_xip.c . The following file operation implementations are provided:5454+- aio_read/aio_write5555+- readv/writev5656+- sendfile5757+5858+The generic file operations do_sync_read/do_sync_write can be used to implement5959+classic synchronous IO calls.6060+6161+Shortcomings6262+------------6363+This implementation is limited to storage devices that are cpu addressable at6464+all times (no highmem or such). It works well on rom/ram, but enhancements are6565+needed to make it work with flash in read+write mode.6666+Putting the Linux kernel and/or its modules on a xip filesystem does not mean6767+they are not copied.