Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3509189rwb; Tue, 8 Nov 2022 05:29:41 -0800 (PST) X-Google-Smtp-Source: AMsMyM4IE+7tCbw8FrgeIT7TtZM2X344SsHJF/191Tn/bPihGxeH2b+wYYUh1034NDFBEeSOknPp X-Received: by 2002:a05:6402:35cb:b0:462:6545:5d99 with SMTP id z11-20020a05640235cb00b0046265455d99mr56278553edc.51.1667914180927; Tue, 08 Nov 2022 05:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667914180; cv=none; d=google.com; s=arc-20160816; b=kELLWTEZEtO5ZnS79B3lDxLZ1MDWTV7l/vIb+xRyJAuXNzOEhga7DFUYU4//PSbYM5 vGhugK0VOYEg/lCAnUcdr3hncdeZpulq9U+OC+kTrq6GCOFjvodHBhTrNwSBBva5+Skn gISU/rbRqCjpCA2oz6nSolPn5EzKH0OxU3kj5c4Vat8BWhyca86tsi1o5oJe4jv3ms0x F33xPjYhfbXWLZnTCo+V2+b4krU+B+4zgrxTOoVMR3F+LaA9AXa3craMScHjgnm8ogDZ 6KkvaXz5rXkkSsNaiWDUyDQfuoo1NnKqc9OEd1zSWX1y+Bs8cxMv+WXk7ViERDoEcuqJ r9EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dHBGD5sXlI0lRYkCZWGfedeiEQdnEUe+C13lU+wZ1iY=; b=IATmfjLEQxZ0e2Ms+sjzVKNl/YhUm1BjZ0h9/4Z8XZEyPUx0P+XFTYPEFJi/9D2Uv8 DLyyEUxGtsfKfQFngOh4/tVk9lRi9jV0gnx2cl3prYhE3x2PdQR5bSBZ7VayMKnWZZNV Zj014ApZ2AxcH93t/SnAUfthK0tBS/v6hqRIM1cxa81ayqddcb8ZNmqj0MOBRp9xGMPz 1NO/PBJOqd49haqLzdE1tXBfL3fEl3+9/VLo8raya989k/IqJ+mEEX3JhKerPbnmZ3lQ Vhh+UKTGpxQQGt6+VkDBjpjyuxcGy5SVJryKxE27Ju8YXEEtgHNHpZIrr+CBUJGBjN/U 2T0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QyvWUkK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd32-20020a1709076e2000b007807e613e5bsi11268311ejc.933.2022.11.08.05.29.19; Tue, 08 Nov 2022 05:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QyvWUkK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233974AbiKHNFF (ORCPT + 89 others); Tue, 8 Nov 2022 08:05:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233866AbiKHNFB (ORCPT ); Tue, 8 Nov 2022 08:05:01 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED609B99; Tue, 8 Nov 2022 05:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dHBGD5sXlI0lRYkCZWGfedeiEQdnEUe+C13lU+wZ1iY=; b=QyvWUkK6pirDDr6L21v798/C7u qqoX+8LbeKfELkmoNJQCl1/4RTkBp+Q1C5iWU5oX4faHgFcSAUyIr/DDmsbT87hAtZlvRHdNYGDIg aMQBS4HzZFNOWMwAKiJTxPE01mKYIHPEDY+pTESREbmDVBbhE0JAAOus5IWcP1XNJwRy0TwmOsETt LY5Q6pS4faSz6cQ2Q5M7FCSK/vV3HYwAZzWr94+O52T0Tk87mnN+lV2s4iCoBTWozgbbOPXecE/ID k9btwTc5+ikym8XA/Y5Ms7EJjxN4f0l1duzlrtRoHojTnlo2ZU10O8NVK1YtpVB3DWbMJCaaMjxid RLO8fq6g==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1osOHe-00AHQF-5N; Tue, 08 Nov 2022 13:04:54 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2CCC7300338; Tue, 8 Nov 2022 14:04:46 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 145D82B8C8559; Tue, 8 Nov 2022 14:04:46 +0100 (CET) Date: Tue, 8 Nov 2022 14:04:46 +0100 From: Peter Zijlstra To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , "Paul E . McKenney" , Boqun Feng , "H . Peter Anvin" , Paul Turner , linux-api@vger.kernel.org, Christian Brauner , Florian Weimer , David.Laight@aculab.com, carlos@redhat.com, Peter Oskolkov , Alexander Mikhalitsyn , Chris Kennelly Subject: Re: [PATCH v5 08/24] sched: Introduce per memory space current virtual cpu id Message-ID: References: <20221103200359.328736-1-mathieu.desnoyers@efficios.com> <20221103200359.328736-9-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103200359.328736-9-mathieu.desnoyers@efficios.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 03, 2022 at 04:03:43PM -0400, Mathieu Desnoyers wrote: > The credit goes to Paul Turner (Google) for the vcpu_id idea. This > feature is implemented based on the discussions with Paul Turner and > Peter Oskolkov (Google), but I took the liberty to implement scheduler > fast-path optimizations and my own NUMA-awareness scheme. The rumor has > it that Google have been running a rseq vcpu_id extension internally at > Google in production for a year. The tcmalloc source code indeed has > comments hinting at a vcpu_id prototype extension to the rseq system > call [1]. Re NUMA thing -- that means that on a 512 node system a single threaded task can still observe 512 separate vcpu-ids, right? Also, said space won't be dense. The main selling point of the whole vcpu-id scheme was that the id space is dense and not larger than min(nr_cpus, nr_threads), which then gives useful properties. But I'm not at all seeing how the NUMA thing preserves that. Also; given the utter mind-bendiness of the NUMA thing; should it go into it's own patch; introduce the regular plain old vcpu first, and then add things to it -- that also allows pushing those weird cpumask ops you've created later into the series.