From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by sourceware.org (Postfix) with ESMTPS id A08D83858C20 for ; Thu, 8 Jun 2023 18:27:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A08D83858C20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=owlfolio.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=owlfolio.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D2809320093C for ; Thu, 8 Jun 2023 14:27:15 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Thu, 08 Jun 2023 14:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1686248835; x=1686335235; bh=W5 2xvQtMQ2FOYz2eFMY9DnrEAtvtrk7KSjFNtGT1U8Q=; b=bpv5sTILaoeZH18oE/ jCdBihNUU0G02Sif5ZYB/vnG3Ry44uY56IhgAbY0jkF31c4GWurekpKZegGJUOgo H5QuPx6gt4aD+Q5kU+PLD9q2x9q+XltKS8HRz731A37IhCQxt6qLTEzZ/iqkJ7ae 4W5qmZvogfj4lbi7A+kNHI80Y+MZmF89ZEc8WzxwDFEVQECpYieYV8O5FUUf+hft 3phDHOf/3T17adva2qUet+MLdKaPkKRfVaKm0yblmNMG7HcwTx3unWppgx+XfccX FD1eVihL4h6lIFXGTpOfrr98zjbnd6wPKMgjzMO7e1kGHyYUy4ejCroMHpoZBH+I aL5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1686248835; x=1686335235; bh=W52xvQtMQ2FOY z2eFMY9DnrEAtvtrk7KSjFNtGT1U8Q=; b=JW1Lo59NYL8iikPEaSZCLkpULBwdi ym4UEw84kPWs5NebkyyyCvEOsYcbv8XxC7yfezcV+NRLMOPBGltp5t05nIFa1HjZ 13qUjiWS0hcSZLiyvw7wWxAOpxmxhF9YHNOQidjfLlICnIx3BmQ23AUDe8cmPyys Czp0hnxGnj/fJ8WaD7HS+gDqs+OZWiwOzbwSaErN9NhinCaAtL11uHSRn1rBfUBN VHpmmR71e1QnZQeqkaRMcrmgHE8M11cob+iPwY2FCBY7RfAfSGOAKpl2+wB3pbWK i/abdFRLqTqy1fdJyS4oKZtLsCDFeoz5l5lufDGi+3qBI+tql+UXEsRlg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedtiedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfkggr tghkucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecugg ftrfgrthhtvghrnhephfeuhfevueffteffgfejtefgkeekheeftdeflefgheffffevheek leefgfehffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1150C272007A; Thu, 8 Jun 2023 14:27:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-447-ge2460e13b3-fm-20230525.001-ge2460e13 Mime-Version: 1.0 Message-Id: <7cf77b35-ce05-421e-b057-c73386bb6b57@app.fastmail.com> In-Reply-To: References: <20230608090050.2056824-1-goldstein.w.n@gmail.com> <87fs729o2z.fsf@mid.deneb.enyo.de> <51ab6d92-6f27-52bf-c70c-c45c478a3299@linaro.org> Date: Thu, 08 Jun 2023 11:26:55 -0700 From: "Zack Weinberg" To: "GNU libc development" Subject: Re: [PATCH v1 1/2] x86: Implement sched_yield syscall for x86 only. Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Jun 8, 2023, at 10:39 AM, Noah Goldstein via Libc-alpha wrote: > I don't think we need/want this for every syscall. Only the syscalls > where there is a high probability of a proper ctx switch and the calling > process going back to the schedule loop. Yeah, but that includes every syscall that performs I/O, which is most of them. Isn't it? If these registers are all call-clobbered then maybe it makes sense to do this unconditionally in the syscall entry path, kernel side. That way only context switches triggered by actual preemption would have to pay the extra register save costs. zw