From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH] xenstore: set READ_THREAD_STACKSIZE to a sane value
Date: Fri, 7 Mar 2014 13:22:58 +0100 [thread overview]
Message-ID: <1394194978-20200-1-git-send-email-roger.pau@citrix.com> (raw)
On FreeBSD PTHREAD_STACK_MIN is 2048 by default, which is obviously
too low. Set the default back to the previous value (16 * 1024), or if
that's too low set it to PTHREAD_STACK_MIN.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@citrix.com>
---
tools/xenstore/xs.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index dd03a85..968141d 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -724,7 +724,10 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token)
struct iovec iov[2];
#ifdef USE_PTHREAD
-#define READ_THREAD_STACKSIZE PTHREAD_STACK_MIN
+#define DEFAULT_THREAD_STACKSIZE (16 * 1024)
+#define READ_THREAD_STACKSIZE \
+ ((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ? \
+ PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE)
/* We dynamically create a reader thread on demand. */
mutex_lock(&h->request_mutex);
--
1.7.7.5 (Apple Git-26)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2014-03-07 12:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 12:22 Roger Pau Monne [this message]
2014-03-10 17:12 ` [PATCH] xenstore: set READ_THREAD_STACKSIZE to a sane value Ian Jackson
2014-03-11 13:24 ` Ian Campbell
2014-03-11 13:52 ` Roger Pau Monné
2014-03-11 14:12 ` Ian Campbell
2014-03-11 15:55 ` Roger Pau Monné
2014-03-11 16:03 ` Ian Campbell
2014-03-11 16:10 ` Ian Campbell
2014-03-11 16:18 ` Roger Pau Monné
2014-03-11 16:22 ` Ian Campbell
2014-03-11 16:25 ` Ian Jackson
2014-03-11 16:32 ` Ian Campbell
2014-03-11 16:42 ` Roger Pau Monné
2014-03-11 16:52 ` Ian Jackson
2014-03-12 10:27 ` Roger Pau Monné
2014-03-12 10:30 ` Ian Campbell
2014-03-12 10:34 ` Roger Pau Monné
2014-03-18 17:16 ` Ian Campbell
2014-03-18 17:20 ` Ian Jackson
2014-03-21 12:18 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394194978-20200-1-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).