From: Ian Campbell Subject: Re: [PATCH V2] xs: set read_thread stacksize Date: Fri, 1 Jun 2012 20:17:18 +0100 Message-ID: <1338578238.14877.67.camel@dagon.hellion.org.uk> References: <2d0a29ab3f917df16804.1338449959@drall.uk.xensource.com> <20425.1120.90566.706268@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20425.1120.90566.706268@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Simon Rowe , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-06-01 at 19:05 +0100, Ian Jackson wrote: > Simon Rowe writes ("[Xen-devel] [PATCH V2] xs: set read_thread stacksize"): > > xs_watch() creates a thread to wake watchers using default attributes. The > > stacksize can be quite large (8 MB on Linux), applications that link against > > xenstore end up having a larger memory footprint than necessary. > > Thanks. This seems like a genuine bug but I have one comments about > your fix. The effect of your patch is to make the stacksize of the > libxenstore private thread be small. > > However, we do not take any care to avoid signals being delivered to > this thread. This is bad enough at the moment, but with your patch > these signals may now be delivered to a thread with a small stack. > > Can I request that you provide another patch too, which would probably > come before this one, which uses pthread_sigprocmask to block all > signals on the private thread ? This is done by changing the signal > mask to all signals blocked and then restoring it afterwards. Do you mean pthread_sigmask or sigprocmask rather than the hybrid pthread_sigprocmask (which appears not to exist). Ian.