Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4167891pxv; Mon, 19 Jul 2021 19:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZPp2QDpVIrJI3Kez/X1iO2HouaVtYpEUZi09fuhSECx2SJ47kvkFRIXZkWh32RfFGEpCG X-Received: by 2002:a05:6402:22aa:: with SMTP id cx10mr37374084edb.0.1626746758121; Mon, 19 Jul 2021 19:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626746758; cv=none; d=google.com; s=arc-20160816; b=pVtUvry/IdAnyyEY0N7G1gpVk6Ifs44+p/Zj4VKh1Gdt2FmfnQd/cBaY8nKJOfzldP vBJSQm4MaZnX25st77VE12L7xka3LgoC0uqr3Tcns/uVN7yHK0WDSKt3Ajl5LOwla6uq uxF/tEIUm3doz1iO+swi+CynRirrNuCg1xkmjYorc0YM2+rE6BknSADiQpV3vsNyt8Yl 6aqa7O6RJ2u6bac8Q+s9qH1gY9ydLtONbiat/7r3rG8R23V4JVur6re4d1+Un07XreOr MdHVJorsvjk/8g/cVqcSmT80lhqyjmJqJZa/Bg8a3y0Uwksh6aw3Zk2he+/4aqON4V0o Oi1Q== 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:dkim-signature; bh=5RdElzatBrWPi341ybPYwP9MwE6vHUvp1KoICLaTaFQ=; b=rjObHeTxMC21VEnQ0WCUF3Q7TwR59mkWN/WxDzCZP3BR3vbbILZcMq+PrrHW+MPa/l Xg2jrZ5tvfJXx/xRu90/wavuUcuWwR8UIvgI5jvmmXDtcd7NaOInCwoOxcO9EIK562NB NjuGkoydnhP0dO14q1Zbn56hTw4oZUZFNozqOfQoR0S5iTHMVa3qvJV0x93xnC1D+PFE 7mQgPBNQNlIOQEcJX00A9I5Ij2vbK0YHP/KAGGdkQvBoWHNOkJpXdlzPtBwglUhkfvMu UUkoResx+/UveqZEeXmbFPh50/G/zBcPDi95AEMN8XHRNSe/lYVBMcArNLdT44yyIOXF E0HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@uwaterloo.ca header.s=default header.b=rEjltEZl; 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 mp29si23292205ejc.290.2021.07.19.19.05.34; Mon, 19 Jul 2021 19:05:58 -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=rEjltEZl; 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 S1351958AbhGSRs6 (ORCPT + 99 others); Mon, 19 Jul 2021 13:48:58 -0400 Received: from esa.hc503-62.ca.iphmx.com ([216.71.135.51]:35849 "EHLO esa.hc503-62.ca.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355519AbhGSRcd (ORCPT ); Mon, 19 Jul 2021 13:32:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uwaterloo.ca; i=@uwaterloo.ca; q=dns/txt; s=default; t=1626718393; x=1658254393; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=VzvZu29zOp7shLhWo6Q+hyIk6zoz9Y0UhxdZuvE/Y24=; b=rEjltEZlhcSecXMOT7kJdsAPCYi0TsoeT5wXWEh/Xrsr2sv3hJAsTmzz tgh94nXEvf5L95b8OEV6H4X++SFjOeofhJPyzfVJojh3H2rVmP45v7Ai1 DVnYrYp5wkDq114XR8c14CExwiVxVEfIT7v62op3hktrIKPESyg4VNG8+ M=; 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; 19 Jul 2021 14:13:06 -0400 Received: from [10.42.0.123] (10.32.139.159) 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.2176.2; Mon, 19 Jul 2021 14:13:05 -0400 Subject: Re: [RFC PATCH 4/4 v0.3] sched/umcg: RFC: implement UMCG syscalls To: Peter Oskolkov CC: , , , , , , , , , , , , Peter Buhr References: <20210716184719.269033-5-posk@google.com> <2c971806-b8f6-50b9-491f-e1ede4a33579@uwaterloo.ca> From: Thierry Delisle Message-ID: Date: Mon, 19 Jul 2021 14:13:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.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.139.159] X-ClientProxiedBy: connhm02.connect.uwaterloo.ca (172.16.137.66) To connhm04.connect.uwaterloo.ca (172.16.137.68) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Latency/efficiency: on worker wakeup an idle server can be picked from > the list and context-switched into synchronously, on the same CPU. > Using FDs and select/poll/epoll will add extra layers of abstractions; > synchronous context-switches (not yet fully implemented in UMCG) will > most likely be impossible. This patchset seems much more efficient and > lightweight than whatever can be built on top of FDs. I can believe that. Are you planning to support separate scheduling instances within a single user space? That is having multiple sets of server threads and workers can only run within a specific set. I believe the problem with the idle_servers_ptr as specified is that it is not possible to reclaim used nodes safely. I don't see any indication of which nodes the kernel can concurrently access and on which some memory reclamation scheme could be based. What is the benefit of having users maintain themselves a list of idle servers rather than each servers marking themselves as 'out of work' and having the kernel maintain the list?