Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2589890pxb; Tue, 12 Oct 2021 09:28:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFpnFKK8c7ji/feiTxGqov8SOPeDC6I/C+aqqrDfeZBCflekBvGqnTRkjqUQ+aa6g8nAZJ X-Received: by 2002:a17:906:1510:: with SMTP id b16mr35350426ejd.332.1634056135457; Tue, 12 Oct 2021 09:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634056135; cv=none; d=google.com; s=arc-20160816; b=iGpOfkTnQ9Ckx7xP4O+6+n2TWRAA55OkGw49hT39klb4/0wYnooDS6HpH/P9TYkk67 VxUCCF9HS2Kjw//OyRPfeaQ88gHypFd8p5rI30TzVaoD9uUkPG0NMOolEMa99R1x6Q5f 51B7YWXM8xBfGrssOlORV7EQFtRYBxutJmkPpGWCAti52Y7nmRDkObIM3nuyv/G9ZEus T2Ddc4lB9kZ0XGICW0DJb6rbfnejhYH6UDdqG4lZWFim3XdNuXSohvGrBNf1/U4Zuejk TXnz2IN5e4BAjf2gt7icEyfIzZWixDXU9ATfxsoz/N77b1jMNrmVGf6p4vO3OEEnfgQk IxVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-data:dkim-signature; bh=SqjHx6Pujuj4EKPCdTmUEoXiXaPFODkpzW/VZtH5xTY=; b=QZhfyuAYbpl6CW3wVC1+bVCYSKcH4AXyji8mRzbs1wMYI/NfR38kSUogfNTGK7gego nNCOzjGVgtEhVeSlYTWR9zJ08oLltt+aIFUqq8kNOfKwlX0WCicAGm1qyn8Kxzi3MVSW aj5eozPNgm/ekal18ogb/gIa1T+QrRNiZzETu2NQ6ny5/s1gRBdUryns7UetOQQMY7lh eZ05GhUg5yWRsALI8JysR4DgFPh1ZtyjsTC7oDR8xbG3cn4JNrCwGS0qPJ9y7eMhvuea /nU3BVY4htjDTogo2JlIs3hztdZXtEX9MYbQC6cc+VpzsZIy+l8zaJZzZ8nKSdFEc8P3 Dnxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@uwaterloo.ca header.s=default header.b=llE4hPPl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=uwaterloo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si8523367edf.82.2021.10.12.09.28.31; Tue, 12 Oct 2021 09:28:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@uwaterloo.ca header.s=default header.b=llE4hPPl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=uwaterloo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbhJLQ1h (ORCPT + 99 others); Tue, 12 Oct 2021 12:27:37 -0400 Received: from esa.hc503-62.ca.iphmx.com ([216.71.135.51]:56847 "EHLO esa.hc503-62.ca.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhJLQ1g (ORCPT ); Tue, 12 Oct 2021 12:27:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uwaterloo.ca; i=@uwaterloo.ca; q=dns/txt; s=default; t=1634055934; x=1665591934; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=DtHWogmbefTOZHJ1zHpA6HOO+MNBFrIhVE63j1QS6y4=; b=llE4hPPljvaT2XxEsi3vAwlxU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uhD4= Received: from connect.uwaterloo.ca (HELO connhm04.connect.uwaterloo.ca) ([129.97.208.43]) by ob1.hc503-62.ca.iphmx.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Oct 2021 12:25:32 -0400 Received: from [10.42.0.123] (10.32.190.116) by connhm04.connect.uwaterloo.ca (172.16.137.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 12 Oct 2021 12:25:31 -0400 Subject: Re: [PATCH 5/5 v0.6] sched/umcg: add Documentation/userspace-api/umcg.txt To: Peter Oskolkov CC: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , , Paul Turner , Ben Segall , Peter Oskolkov , Andrei Vagin , Jann Horn References: <20210917180323.278250-1-posk@google.com> <20210917180323.278250-6-posk@google.com> <12eb2300-4a78-9e93-30a3-8e2ddba4693f@uwaterloo.ca> From: Thierry Delisle Message-ID: Date: Tue, 12 Oct 2021 12:25:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.32.190.116] X-ClientProxiedBy: connhm01.connect.uwaterloo.ca (172.16.137.65) To connhm04.connect.uwaterloo.ca (172.16.137.68) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Hi Thierry, > > sorry for the delayed reply - I'm finally going through the > documentation patches in preparation for the upcoming next version > patchset mail-out. No problem. > The documentation here outlines what sys_umcg_wait does, and it does > put the current task to sleep without context switching if next_tid is > zero. The question of whether this behavior is or is not appropriate > for a worker wishing to yield/park itself is at a "policy" level, if > you wish, and this "policy" level is described in "state transitions" > section later in the document. sys_umcg_wait() does not enforce this > "policy" directly, in order to make it simpler and easier to describe > and reason about. Just to be clear, sys_umcg_wait supports an operation that, when called from a worker, puts the worker to sleep without triggering block detection or context-switching back to the server? >> With that said, I'm a little confused by the usage of "yields" in that >> example. I would expect workers yielding to behave like kernel threads >> calling sched_yield(), i.e., context switch to the server but also be >> immediately added to the idle_workers_ptr. > > I'm not a fan of arguing about how to name things. If the maintainers > ask me to rename wait/wake to park/unpark, I'll do that. I understand the sentiment, and I'm perfectly happy with the use of wait/wake. I was exclusively referring to this one use of "yield" in the documentation.