freebsd-dev/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 Fix partition alignment and image rounding when any of -P (block size), 2014-09-19 23:16:02 +00:00
bsd.c Fix partition alignment and image rounding when any of -P (block size), 2014-09-19 23:16:02 +00:00
ebr.c mkimg: support fat16b partitions (MBR type 06h) 2015-10-15 01:09:14 +00:00
format.c Don't resize again prior to writing. Resizing may not be idempotent 2015-06-21 01:35:32 +00:00
format.h MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
gpt.c Add the ntfs alias and support it with the MBR and GPT schemes 2015-06-27 03:28:04 +00:00
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 Microsoft Azure expects the creator OS to be "Wi2k" and not "FBSD". 2015-06-21 02:45:31 +00:00
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 Add the -c option for specifying the capacity of the disk image. When 2015-02-22 04:50:47 +00:00
mkimg.h Add mkimg_chs() for those schemes that need the LBA broken down into 2014-10-03 20:48:11 +00:00
pc98.c Add mkimg_chs() for those schemes that need the LBA broken down into 2014-10-03 20:48:11 +00:00
qcow.c The size of the first level reference count table is given in terms of the 2014-12-12 06:13:31 +00:00
raw.c Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V 2014-07-03 20:31:43 +00:00
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 Create a redundant grain directory and table. Previously we were 2014-08-09 04:47:12 +00:00
vtoc8.c Fix partition alignment and image rounding when any of -P (block size), 2014-09-19 23:16:02 +00:00