* Change the offset alignment in vn_rdwe_inchunks()
authorDavid Rhodus <drhodus@dragonflybsd.org>
Mon, 29 Mar 2004 15:21:42 +0000 (15:21 +0000)
committerDavid Rhodus <drhodus@dragonflybsd.org>
Mon, 29 Mar 2004 15:21:42 +0000 (15:21 +0000)
commit9a0222acebf4e7e28f3d2650a674332f99b0ea21
tree8f57767eebc97f694bbb26d9b651bbfe678d59fb
parent3adf08819ced99ac15feec00b68255441f955a42
* Change the offset alignment in vn_rdwe_inchunks()
This is primarily used by the ELF image activator.

FreeBSD src repository

  Modified files:
    sys/kern             vfs_vnops.c
  Log:
  Align the offset in vn_rdwr_inchunks() so that at most the first and
  the last chunk are misaligned relative to a MAXBSIZE byte boundary.
  vn_rdwr_inchunks() is used mainly for elf core dumps, and elf sections
  are usually perfectly misaligned relative to MAXBSIZE, and chunking
  prevents the file system from doing much realigning.

  This gives a surprisingly large speedup for core dumps -- from 50 to
  13 seconds for a 512MB core dump here.  The pessimization was mostly
  from an interaction of the misalignment with IO_DIRECT.  It increased
  the number of i/o's for each chunk by a factor of 5 (3 writes and 2
  read-before-writes instead of 1 write).
sys/kern/vfs_vnops.c