* [PATCH] libxenstore: Use PTHREAD_STACK_MIN
@ 2013-10-25 7:47 Ian Campbell
2013-10-28 15:33 ` Ian Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Ian Campbell @ 2013-10-25 7:47 UTC (permalink / raw)
To: xen-devel
Cc: ian.jackson, julien.grall, tim, Ian Campbell, stefano.stabellini
From: Ian Campbell <ian.campbell@citrix.com>
The existing value of 16K is smaller than the arm64 minimum stack size, which
is 128K. PTHREAD_STACK_MIN appears to be standard
http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_setstacksize.html
Consindered setting a lower bound but the stack requirements of the watcher
thread are pretty minimal (tens of bytes from the looks of it) and unlikely to
blow PTHREAD_STACK_MIN on any useful platform.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: ian.jackson@eu.citrix.com
---
tools/xenstore/xs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b1e6820..261b841 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -723,7 +723,7 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token)
struct iovec iov[2];
#ifdef USE_PTHREAD
-#define READ_THREAD_STACKSIZE (16 * 1024)
+#define READ_THREAD_STACKSIZE PTHREAD_STACK_MIN
/* We dynamically create a reader thread on demand. */
mutex_lock(&h->request_mutex);
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] libxenstore: Use PTHREAD_STACK_MIN
2013-10-25 7:47 [PATCH] libxenstore: Use PTHREAD_STACK_MIN Ian Campbell
@ 2013-10-28 15:33 ` Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2013-10-28 15:33 UTC (permalink / raw)
To: Ian Campbell
Cc: stefano.stabellini, tim, Ian Campbell, julien.grall, xen-devel
Ian Campbell writes ("[PATCH] libxenstore: Use PTHREAD_STACK_MIN"):
> From: Ian Campbell <ian.campbell@citrix.com>
>
> The existing value of 16K is smaller than the arm64 minimum stack size, which
> is 128K. PTHREAD_STACK_MIN appears to be standard
> http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_setstacksize.html
>
> Consindered setting a lower bound but the stack requirements of the watcher
> thread are pretty minimal (tens of bytes from the looks of it) and unlikely to
> blow PTHREAD_STACK_MIN on any useful platform.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-28 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-25 7:47 [PATCH] libxenstore: Use PTHREAD_STACK_MIN Ian Campbell
2013-10-28 15:33 ` Ian Jackson
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).