From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iCMnAABGP2LCsAAAgWs5BA (envelope-from ) for ; Sat, 26 Mar 2022 17:57:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kIQHOf9FP2J5lgAA9RJhRA (envelope-from ) for ; Sat, 26 Mar 2022 17:57:35 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AB6BE2DB34 for ; Sat, 26 Mar 2022 17:57:35 +0100 (CET) Received: from localhost ([::1]:59280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nY9jK-0003Al-IB for larch@yhetil.org; Sat, 26 Mar 2022 12:57:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nY9iL-0003AL-3s for guix-devel@gnu.org; Sat, 26 Mar 2022 12:56:33 -0400 Received: from pelzflorian.de ([5.45.111.108]:40750 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nY9iI-0001bU-JZ; Sat, 26 Mar 2022 12:56:32 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 035CD360630; Sat, 26 Mar 2022 17:56:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1648313789; bh=9jbVEiGiqcmylXmuPrO+JcXRIjQhGrh4tQ0ZVns1HT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=B2OX+NQiSX86J6evUoANYCHZ2iZk2dW0V5n7EqTrmtG/SZbgIkSUbMZJn/syM3190 1nsAMgs6wfZqfX4aTGzJUQceRTU86EyiP07newrYmnh1MsM0cjJsgvZf5Mo2RuXGQX P683vtZAj2So3Wnx76BtIftUutaUiRUBZyfvVLrw= Date: Sat, 26 Mar 2022 17:56:22 +0100 From: "pelzflorian (Florian Pelz)" To: Zhu Zihao Subject: Re: The Shepherd on Fibers Message-ID: <20220326165601.bv76cvataz53hndj@pelzflorian.localdomain> References: <87ee2sfg9d.fsf@inria.fr> <20220326110627.dm3t7u2jtjxz5xf6@pelzflorian.localdomain> <868rsxufwx.fsf@163.com> <20220326111834.zwqeswbc7vrsl4bz@pelzflorian.localdomain> <861qypq79p.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <861qypq79p.fsf@163.com> Received-SPF: pass client-ip=5.45.111.108; envelope-from=pelzflorian@pelzflorian.de; helo=mail.pelzflorian.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648313855; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XSWOTatkInTPznQhiKMvf1PexfNLiowKPldp+/j4d4k=; b=WFxI+EIsvAVKSa/gjlIduDb4Go2b/YedkgxLXiGIb7mNrlUp1uGhhpS9SyPIACznEI0GEy Nh9k4ERRCN3wKvCx+wv0omEMCS8rk7ZqaEqbmFGqUof4Z8uvjdYalP4Z3R7XI48/+Z05Qy P9CavKsINjgT+Pl5oWtSmUcrLgmLPHx8S4kHS3qSZ6DGFs26VQ6UwMntNy/d4Mi70vhUWa gORen1MdPplTdOhsdZmy4AC0dLkCfHse4XGX3VmcptK5LA4sObaaQp/LbaA+n023TyGULc Nj/KKdTv7FV2EWitRF4klSOsyMeHRiECLPSAtG8dQe10m3R1WmWnN1nlJlMv9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648313855; a=rsa-sha256; cv=none; b=GfnK2/aeUfn9v9eCPqIkE3gW2rwNvjxIaBE3+hlTMLbnbjUPWFZB6PNnQ45gBftqG7/C/R tSGGUmLS/sN6mvt1icV2Nfuym/ty5hoqn5HsWS3jiR1SfDQ/ygsh6YGLGzvwdbHo9CRKxo S4Mkyo7KksRFoW7kXB/iqaizdwMscBodu52YOkghkPMdaVQCYlOb28FUk4qraFFIv0c1Vv +L3m/DaHaQuP13WJjandLr9SbZKHN1Jtu5EXwj2+E8IpmEaxXuMMQZxH5OD7bGeoptyPuG EIGqMp2LSQijywuS1HSU5CdQ6nRrB3qc6E+vJpV0KzkdU3pp1N9+B6aLUuxAxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=mail header.b=B2OX+NQi; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=mail header.b=B2OX+NQi; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AB6BE2DB34 X-Spam-Score: 1.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6jYUvbSTQ17o On Sat, Mar 26, 2022 at 07:27:00PM +0800, Zhu Zihao wrote: > > IIUC, After fork and execute the program, shepherd will wait for the pid > file to appear. This is a block operation. > > Shepherd on Fiber make this operation non-blocking (because the pid file > is created by Linux kernel, Shepherd just need to wait for it), every > service activation runs on its own fiber. after fork+exec, shepherd > suspend current fiber, andspawn another fiber to start another service > immediately. > > But finally all fibers are co-operatively scheduled on 1 thread. Thank you Zhu for explaining! I had not understood waiting for the PID file is the issue solved by fibers. Regards, Florian