From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Mon, 18 Mar 2019 22:04:46 +0300 From: Cyrill Gorcunov Subject: Re: [tarantool-patches] Re: [PATCH] lib/core/fiber: Initialize stack_watermark where appropriate Message-ID: <20190318190446.GD2469@uranus.lan> References: <20190318172352.14128-1-gorcunov@gmail.com> <20190318175246.22utl4hoc3jnxuk2@esperanza> <20190318185529.GA11507@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190318185529.GA11507@chai> To: Konstantin Osipov Cc: vdavydov.dev@gmail.com, tarantool-patches@freelists.org List-ID: On Mon, Mar 18, 2019 at 09:55:29PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/03/18 20:56]: > > > On Mon, Mar 18, 2019 at 08:23:52PM +0300, Cyrill Gorcunov wrote: > > > The stack_watermark member declared with HAVE_MADV_DONTNEED wrap, > > > so need to guard it here the same way. > > What is the reason to keep the poison pool 8 elements now that it > is only used to save on madvise() invocations and is put in a > random position? Shouldn't 1 element be enough? Even 8 elements are not guarantee us from false positives and with a sole element the situation would be even worse. > What is the actual stack size for 99.9% of cases? Why not put the > poison at 16kb of stack? Well, I think we can't answer this question without gathering statistics.