All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]put xenstored tdb to tmpfs
@ 2010-01-21  3:19 Zhigang Wang
  0 siblings, 0 replies; only message in thread
From: Zhigang Wang @ 2010-01-21  3:19 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

Hi,

This patch put the xenstored tdb into tmpfs. It will improve the performance
when there are intensive xenstore read/writes.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>

thanks,

zhigang





[-- Attachment #2: put-xenstored-tdb-to-tmpfs.patch --]
[-- Type: text/x-patch, Size: 665 bytes --]

--- xen-unstable/tools/hotplug/Linux/init.d/xend	2009-09-18 00:04:17.000000000 +0800
+++ xen-unstable/tools/hotplug/Linux/init.d/xend.new	2010-01-21 11:12:48.000000000 +0800
@@ -57,6 +57,13 @@
 	test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
 	[[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
 	[[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export XENBACKENDD_DEBUG
+	pid=`cat /var/run/xenstore.pid 2>/dev/null`
+	if [ -z "$pid" -o ! -d "/proc/$pid" ]; then
+		dir=${XENSTORED_ROOTDIR:-/var/lib/xenstored}
+		if ! grep -q "$dir" /proc/mounts 2>/dev/null; then
+			mount -t tmpfs none "$dir"
+		fi
+	fi
 	xend start
 	await_daemons_up
 	;;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-21  3:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21  3:19 [PATCH]put xenstored tdb to tmpfs Zhigang Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.