On 7/26/07, Ingo Molnar <mingo@elte.hu> wrote:
--- /etc/cron.daily/mlocate.cron.orig
+++ /etc/cron.daily/mlocate.cron
@@ -1,4 +1,7 @@
#!/bin/sh
nodevs=$(< /proc/filesystems awk '$1 == "nodev" { print $2 }')
renice +19 -p $$ >/dev/null 2>&1
+PREV=`cat /proc/sys/vm/vfs_cache_pressure 2>/dev/null`
+echo 0 > /proc/sys/vm/vfs_cache_pressure 2>/dev/null
/usr/bin/updatedb -f "$nodevs"
+[ "$PREV" != "" ] && echo $PREV > /proc/sys/vm/vfs_cache_pressure 2>/dev/null
_______________________________________________
http://ck.kolivas.org/faqs/replying-to-mailing-list.txt
ck mailing list - mailto:
ck@vds.kolivas.org
http://vds.kolivas.org/mailman/listinfo/ck
uhm... pardon my ignorance, but, doesn't this hack create a possible race condition?
Ie, this job starts, and while updatedb runs some other app/script (let's call it Gort) pokes with vfs_cache_pressure (saving 10000, as it's the current value), then updatedb finishes, and then a while after that Gort stops, "restoring" vfs_cache_pressure to 10000 instead of $PREV?