On Tue, Mar 29, 2011 at 5:32 PM, Harald Becker <[email protected]> wrote: > Hallo Arno! > >> mount -r -o remount / >> reboot >> >> The problem is, I can't remount it r/o. "device is busy". >> And without doing this, my jffs2-filesystem is not in a stable state >> while reboot. > > Do a lazy umount before reboot (umount -l). My approch: > > sync; sleep 0.25s > killall5 -TERM > sync; sleep 1.5s > ...
Better approach is to parallelize initial sync and kill: sync & killall5 -TERM sync; sleep 1.5s Otherwise the "sync; sleep 0.25s" line may end up waiting for a very long time if you have tons of dirty data in RAM. If you run swap in background and immediately signal everyone to TERMinate, then (1) sync starts to free up memory occupied by dirty data (2) processes terminating due to "killall5 -TERM" might (a) delete some temporary files for which they have buffered dirty data, thus "cancelling" writeout for it, and (b) by exiting, they might free up useful RAM needed for faster termination of other processes (say, big, swapped out ones). Which in turn again may reduce amount of swap activity. > sync; sleep 0.25s > sync; sleep 0.5s Double sync is not needed, but you might want to have it simply because of paranoid reasons (every good admin should be a bit paranoid) :D -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
