From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1E14628003 for ; Fri, 22 Feb 2019 04:21:59 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p552WL4wBkSd for ; Fri, 22 Feb 2019 04:21:59 -0500 (EST) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 5A57428002 for ; Fri, 22 Feb 2019 04:21:58 -0500 (EST) From: =?utf-8?B?0JPQtdC+0YDQs9C40Lkg0JrQuNGA0LjRh9C10L3QutC+?= Subject: [tarantool-patches] Re: [RFC] fiber: Increase default stack size Date: Fri, 22 Feb 2019 12:24:12 +0300 Message-ID: <1732287.KUceHh0FeD@home.lan> In-Reply-To: <20190222074607.GU7198@uranus> References: <20190221212642.GT7198@uranus> <7936473.6eviP72C8M@home.lan> <20190222074607.GU7198@uranus> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1761756.M0DsERtEkE"; micalg="pgp-sha256"; protocol="application/pgp-signature" Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Cyrill Gorcunov Cc: tarantool-patches@freelists.org --nextPart1761756.M0DsERtEkE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" On Friday, February 22, 2019 10:46:07 AM MSK Cyrill Gorcunov wrote: > On Fri, Feb 22, 2019 at 10:38:42AM +0300, =D0=93=D0=B5=D0=BE=D1=80=D0=B3= =D0=B8=D0=B9 =D0=9A=D0=B8=D1=80=D0=B8=D1=87=D0=B5=D0=BD=D0=BA=D0=BE wrote: > > Hi Cyrill! >=20 > Hi! >=20 > > Thanks for the patch, please see some comments bellow. > > I like your approach but I think we should do it in a different manner:= we > > could poison 64k page of a fiber stack on start and then check the pois= on > > mark when fiber finished. If watermark was overwritten by fiber activity > > we could use madvise in order to decrease RSS usage. >=20 > I somehow fail to see how it is different from the current scheme. > In the patch we put single 8 16 bytes poison at 64K (well, page > aligned offset to be precise) and once the fiber scheduled out we > test it. I suspect the difference you mean is to _when_ test the poison? > Or you mean to poison the whole 64K? I complain only that you check poison on each fiber schedule what could be = too=20 expensive - a fiber could be scheduled about million times per second. I think If we would check a fiber stack poison when it goes to recycle so i= s=20 will be a better option. >=20 > p.s. > You know, I think this stack limits *must not* be fixed in size but > rather configurable from some parameters (getenv or something). Otherwise > it will be an endless run and catch game. --nextPart1761756.M0DsERtEkE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEFB+nbqWGnp59Rk9ZFSyY70x8X3sFAlxvv7wACgkQFSyY70x8 X3uzWggAp6BWpRVSkFpXYQURFNEtZv+94Q/GGJn86Ck3cwYys/lUilzXcXrg0rQM 3FndmuyMWwbrbKKBw++P6p98IcDMnIdO0L6GlK39NYH76iNkWUj3HvuMBKEoGZWj vtc2DZIugGXp/6FEXMJ2TAui/HFyLTvqrGZw41RD7PMV+dBQnel7VtsrFFWBeVKC TbSC9ZPlm1FPEr9NhZWHMp4Vmk0MocogldQrGfimQCK5di7VxILvP1p1rsFdj+zB mnEh9zeietrwAZnw1ZbM6WnEZLjYWcon+MYg9vgLZ1w+FMwWBg9m7Knnv7BkFfpF VGvwo7XnRf6s+3ChD350SXXytvGR9w== =ynbL -----END PGP SIGNATURE----- --nextPart1761756.M0DsERtEkE--