From: Cristian Rodríguez Date: Thu, 20 May 2010 13:33:27 +0000 (-0400) Subject: - use the "noop" elevator on virtual machines X-Git-Tag: obs_2.0~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f52a63ddc756806e8a4d9e0473334dbd2ed52abf;p=tools%2Fobs-build.git - use the "noop" elevator on virtual machines - mount filesystems with "noatime" - tune filesystems to use data=writeback mode by default --- diff --git a/build b/build index 25dd4fb..493aa2a 100755 --- a/build +++ b/build @@ -20,9 +20,9 @@ repos=() # defaults for vm_img_mkfs vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F' -vm_img_tunefs_ext4='tune2fs -c 0' +vm_img_tunefs_ext4='tune2fs -c 0 -o journal_data_writeback' vm_img_mkfs_ext3='mkfs.ext3 -m 0 -q -F' -vm_img_tunefs_ext3='tune2fs -c 0' +vm_img_tunefs_ext3='tune2fs -c 0 -o journal_data_writeback' vm_img_mkfs_ext2='mkfs.ext2 -m 0 -q -F' vm_img_tunefs_ext2='tune2fs -c 0' vm_img_mkfs_reiserfs='mkreiserfs -q -f' @@ -535,7 +535,7 @@ detect_vm_2nd_stage() RUNNING_IN_VM=true mount -orw -n -tproc none /proc if test "$VM_TYPE" != 'lxc'; then - mount -n -o remount,rw / + mount -n -o remount,noatime,rw / fi # qemu inside of xen does not work, check again with kvm later before enabling this # if [ -e /dev/kqemu ]; then @@ -1407,7 +1407,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do echo "Please report to your server admin, there might be multiple services running for same domain" cleanup_and_exit 3 fi - set -- xm create -c $BUILD_DIR/xen.conf name="build:$XENID" ${MEMSIZE:+memory=$MEMSIZE} $XMROOT $XMSWAP extra="quiet init="$vm_init_script" panic=1 console=ttyS0" + set -- xm create -c $BUILD_DIR/xen.conf name="build:$XENID" ${MEMSIZE:+memory=$MEMSIZE} $XMROOT $XMSWAP extra="quiet init="$vm_init_script" elevator=noop panic=1 console=ttyS0" if test "$PERSONALITY" != 0 ; then # have to switch back to PER_LINUX to make xm work set -- linux64 "$@" @@ -1416,7 +1416,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do "$@" || cleanup_and_exit 3 elif [ "$VM_TYPE" = 'uml' ]; then echo "booting UML kernel ..." - set -- $uml_kernel initrd=$uml_initrd root=/ubda init="$vm_init_script" panic=1 quiet ubd0=$VM_IMAGE ${MEMSIZE:+mem=$MEMSIZE} + set -- $uml_kernel initrd=$uml_initrd root=/ubda init="$vm_init_script" panic=1 elevator=noop quiet ubd0=$VM_IMAGE ${MEMSIZE:+mem=$MEMSIZE} echo "$@" "$@" elif [ "$VM_TYPE" = 'qemu' -o "$VM_TYPE" = 'kvm' ]; then @@ -1437,7 +1437,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do set -- $qemu_bin -no-reboot -nographic -net none -serial stdio \ -kernel $qemu_kernel \ -initrd $qemu_initrd \ - -append "root=$qemu_rootdev panic=1 quiet noapic rw console=ttyS0 init=$vm_init_script" \ + -append "root=$qemu_rootdev panic=1 quiet noapic rw elevator=noop console=ttyS0 init=$vm_init_script" \ ${MEMSIZE:+-m $MEMSIZE} \ "${qemu_disks[@]}"