freebsd-skq/usr.bin/mkimg
Mark Johnston cc7f01a5da mkimg: Indicate that input file pages are unlikely to be reused.
mkimg(1) uses a swap file to back input file chunks. When the output file
is being written out, blocks of the swap file are mapped and their contents
copied. This causes the backing VM pages to enter the active queue, and when
the output file is large relative to system memory (as is generally the
case), can result in a shortfall of inactive memory. This causes the
pagedaemon to aggressively scan the active queue and swap out process
memory in an attempt to meet the shortfall. Because mkimg's input files
are typically the intermediate result of some build process, there's no
need to push them all through the active queue. Use madvise(2) to indicate
that the backing pages may be reclaimed in preference to active pages. In
the case of the swap file, these pages will be freed as soon as mkimg
exits anyway.

When using mkimg on a desktop-class system with large amounts of dirty
process memory, this change substantially improves mkimg runtime and
reduces swap usage.

Reviewed by:	marcel
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6654
2016-06-01 02:30:06 +00:00
..
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
apm.c
bsd.c
ebr.c mkimg: support fat16b partitions (MBR type 06h) 2015-10-15 01:09:14 +00:00
format.c
format.h
gpt.c
image.c mkimg: Indicate that input file pages are unlikely to be reused. 2016-06-01 02:30:06 +00:00
image.h Make image_copyout_zeroes() an interface function. 2015-08-03 01:24:48 +00:00
Makefile
Makefile.depend META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
mbr.c Add ppcboot FAT type. Needed to create a bootable powerpc image. 2015-12-11 05:39:42 +00:00
mkimg.1 Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
mkimg.c
mkimg.h
pc98.c
qcow.c
raw.c
scheme.c Add ppcboot FAT type. Needed to create a bootable powerpc image. 2015-12-11 05:39:42 +00:00
scheme.h Add ppcboot FAT type. Needed to create a bootable powerpc image. 2015-12-11 05:39:42 +00:00
vhd.c Fix the dynamic VHD format to work with qemu. The size of the disk 2015-08-07 04:27:51 +00:00
vmdk.c
vtoc8.c