Change default block size for user VBLK device access from 2K to PAGE_SIZE

(4K on an i386, 8K on an alpha).

    Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
This commit is contained in:
Matthew Dillon 1999-09-22 04:11:55 +00:00
parent 735ce767c7
commit a59d364a23
6 changed files with 75 additions and 2 deletions

View File

@ -98,9 +98,16 @@
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1<<DEV_BSHIFT)
#define BLKDEV_IOSIZE 2048
#ifndef BLKDEV_IOSIZE
#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
#endif
#ifndef DFLTPHYS
#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
#endif
#ifndef MAXPHYS
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
#endif
#define CLSIZE 1
#define CLSIZELOG2 0

View File

@ -56,6 +56,25 @@ maxusers 10
options MAXDSIZ="(256*1024*1024)"
options DFLDSIZ="(256*1024*1024)"
#
# BLKDEV_IOSIZE sets the default block size used in user block
# device I/O. Note that this value will be overriden by the label
# when specifying a block device from a label with a non-0
# partition blocksize
#
# DFLTPHYS is the default maximum physical I/O transaction size
# and is used mostly by the clustering code. It must be a
# multiple of the system page size.
#
# MAXPHYS is the absolute maximum physical I/O transaction size.
# It must be a multiple of the system page size.
#
# In general you should not modify either DFLTPHYS or MAXPHYS.
#
options BLKDEV_IOSIZE=8192
options DFLTPHYS="(64*1024)"
options MAXPHYS="(128*1024)"
# Options for the VM subsystem
#options PQ_NOOPT # No coloring
options PQ_LARGECACHE # color for 512k/16k cache

View File

@ -288,6 +288,9 @@ INVARIANT_SUPPORT opt_global.h
INVARIANTS opt_global.h
SIMPLELOCK_DEBUG opt_global.h
VFS_BIO_DEBUG opt_global.h
BLKDEV_IOSIZE opt_global.h
DFLTPHYS opt_global.h
MAXPHYS opt_global.h
# These are VM related options
VM_KMEM_SIZE opt_vm.h

View File

@ -56,6 +56,25 @@ maxusers 10
options MAXDSIZ="(256*1024*1024)"
options DFLDSIZ="(256*1024*1024)"
#
# BLKDEV_IOSIZE sets the default block size used in user block
# device I/O. Note that this value will be overriden by the label
# when specifying a block device from a label with a non-0
# partition blocksize
#
# DFLTPHYS is the default maximum physical I/O transaction size
# and is used mostly by the clustering code. It must be a
# multiple of the system page size.
#
# MAXPHYS is the absolute maximum physical I/O transaction size.
# It must be a multiple of the system page size.
#
# In general you should not modify either DFLTPHYS or MAXPHYS.
#
options BLKDEV_IOSIZE=8192
options DFLTPHYS="(64*1024)"
options MAXPHYS="(128*1024)"
# Options for the VM subsystem
#options PQ_NOOPT # No coloring
options PQ_LARGECACHE # color for 512k/16k cache

View File

@ -56,6 +56,25 @@ maxusers 10
options MAXDSIZ="(256*1024*1024)"
options DFLDSIZ="(256*1024*1024)"
#
# BLKDEV_IOSIZE sets the default block size used in user block
# device I/O. Note that this value will be overriden by the label
# when specifying a block device from a label with a non-0
# partition blocksize
#
# DFLTPHYS is the default maximum physical I/O transaction size
# and is used mostly by the clustering code. It must be a
# multiple of the system page size.
#
# MAXPHYS is the absolute maximum physical I/O transaction size.
# It must be a multiple of the system page size.
#
# In general you should not modify either DFLTPHYS or MAXPHYS.
#
options BLKDEV_IOSIZE=8192
options DFLTPHYS="(64*1024)"
options MAXPHYS="(128*1024)"
# Options for the VM subsystem
#options PQ_NOOPT # No coloring
options PQ_LARGECACHE # color for 512k/16k cache

View File

@ -91,9 +91,15 @@
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1<<DEV_BSHIFT)
#define BLKDEV_IOSIZE 2048
#ifndef BLKDEV_IOSIZE
#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
#endif
#ifndef DFLTPHYS
#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
#endif
#ifndef MAXPHYS
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
#endif
#define IOPAGES 2 /* pages of i/o permission bitmap */
#define UPAGES 2 /* pages of u-area */