Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-06 Thread Ian Jackson
Juergen Gross writes ("Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread"): > On 06/03/18 12:24, Olaf Hering wrote: > > +ifeq ($(CONFIG_Linux),y) > > +LDLIBS_libxenstore += -ldl > > +endif > > So we need to add t

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-06 Thread Juergen Gross
On 06/03/18 12:24, Olaf Hering wrote: > On Fri, Mar 02, Wei Liu wrote: > >> But still, Juergen must have tested the change, so I wonder why it >> doesn't work in your setup. What is your build environment? Gcc version? > > Unclear what the difference is between building in clean chroot and locall

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-06 Thread Olaf Hering
On Fri, Mar 02, Wei Liu wrote: > But still, Juergen must have tested the change, so I wonder why it > doesn't work in your setup. What is your build environment? Gcc version? Unclear what the difference is between building in clean chroot and locally. This change fixes it for me: --- a/tools/Rul

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Wei Liu
On Fri, Mar 02, 2018 at 10:23:08AM -0700, Jim Fehlig wrote: > On 03/02/2018 05:40 AM, Wei Liu wrote: > > On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: > > > On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: > > > > On 02/26/2018 01:46 AM, Juergen Gross wrote: > > > > > When cre

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Jim Fehlig
On 03/02/2018 05:40 AM, Wei Liu wrote: On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: On 02/26/2018 01:46 AM, Juergen Gross wrote: When creating a pthread in xs_watch() try to get the minimal needed size of the thread from g

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Juergen Gross
On 02/03/18 15:28, Wei Liu wrote: > On Fri, Mar 02, 2018 at 01:45:14PM +0100, Juergen Gross wrote: >> On 02/03/18 13:40, Wei Liu wrote: >>> On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: > On 02/26/2018 01:46 AM, Juergen

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Wei Liu
On Fri, Mar 02, 2018 at 01:45:14PM +0100, Juergen Gross wrote: > On 02/03/18 13:40, Wei Liu wrote: > > On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: > >> On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: > >>> On 02/26/2018 01:46 AM, Juergen Gross wrote: > When creating a

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Juergen Gross
On 02/03/18 13:40, Wei Liu wrote: > On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: >> On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: >>> On 02/26/2018 01:46 AM, Juergen Gross wrote: When creating a pthread in xs_watch() try to get the minimal needed size of the thre

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Wei Liu
On Fri, Mar 02, 2018 at 12:29:31PM +, Wei Liu wrote: > On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: > > On 02/26/2018 01:46 AM, Juergen Gross wrote: > > > When creating a pthread in xs_watch() try to get the minimal needed > > > size of the thread from glibc instead of using a co

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-03-02 Thread Wei Liu
On Mon, Feb 26, 2018 at 09:53:38AM -0700, Jim Fehlig wrote: > On 02/26/2018 01:46 AM, Juergen Gross wrote: > > When creating a pthread in xs_watch() try to get the minimal needed > > size of the thread from glibc instead of using a constant. This avoids > > problems when the library is used in prog

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Jim Fehlig
On 02/26/2018 01:46 AM, Juergen Gross wrote: When creating a pthread in xs_watch() try to get the minimal needed size of the thread from glibc instead of using a constant. This avoids problems when the library is used in programs with large per-thread memory. Use dlsym() to get the pointer to __

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread"): > It is already enclosed in CONFIG_Linux. I think that should be enough. Oh, I see. I had read USE_DLSYM as CONFIG_DLSYM, ie "dlsym is available".

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Wei Liu
On Mon, Feb 26, 2018 at 12:03:29PM +, Ian Jackson wrote: > Wei Liu writes ("Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get > minimum thread stack size for watch thread"): > > I don't think FreeBSD needs this particular workaround for glibc FWIW. > > In

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread"): > I don't think FreeBSD needs this particular workaround for glibc FWIW. Indeed. Err, I guess we should have a configure test of some kind then ? The patc

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Wei Liu
On Mon, Feb 26, 2018 at 09:46:12AM +0100, Juergen Gross wrote: > When creating a pthread in xs_watch() try to get the minimal needed > size of the thread from glibc instead of using a constant. This avoids > problems when the library is used in programs with large per-thread > memory. > > Use dlsy

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Wei Liu
On Mon, Feb 26, 2018 at 09:46:01AM +, Roger Pau Monné wrote: > > > > if (pthread_attr_init(&attr) != 0) { > > mutex_unlock(&h->request_mutex); > > return false; > > } > > - if (pthread_attr_setstacksize(&attr, READ_THRE

Re: [Xen-devel] [PATCH v2] tools/xenstore: try to get minimum thread stack size for watch thread

2018-02-26 Thread Roger Pau Monné
On Mon, Feb 26, 2018 at 09:46:12AM +0100, Juergen Gross wrote: > When creating a pthread in xs_watch() try to get the minimal needed > size of the thread from glibc instead of using a constant. This avoids > problems when the library is used in programs with large per-thread > memory. > > Use dlsy