Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2630899rwb; Thu, 17 Nov 2022 13:43:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf7olBjpQOqLPtHioQXgwHQgahKym8a0a1IeMjL1Mb25PxzLRSAutqNNlkaQqXAR+IaB1e+D X-Received: by 2002:a17:907:d092:b0:7ad:7e85:8056 with SMTP id vc18-20020a170907d09200b007ad7e858056mr3663069ejc.40.1668721406704; Thu, 17 Nov 2022 13:43:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668721406; cv=none; d=google.com; s=arc-20160816; b=waTJj4W4tEnbhKftKLgDj2Nm1Leyntd3vRSqxxIdEeIqFux94QeFJUn1ZG32LWX4mq m4sLc8BmzksvuYTDRJKs2FzMSVMRs32GGW8KTgMHMCUX6aAsBrwOkwG5wxdfkPM7I+mX QKDdM7wj4318Hvzloszu9skdIgnlNZE1nk/JYllLAFdvRp4mu1RYc37fENjENliPo1+c sQROGPjv92tdSRbMBML8edBTezWq/ZDEpsf/hYmo4Yc3RMUf6IKzlsvS06HxIvFUJW7V BLvSpmD6fGIVEW3zxHk2pW7Nu0b+e5cNMiFx1oP07kxyYGphE/5PqyNOkqMNBQxkvCox IocQ== 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=O7lCHfRItoVgEuH12a2Mks7lBSPSXZSQzuXgs8OSirI=; b=s9O31xsdvVvFc3/rUE1AoKyLcZ2230yuYUPCJ46/ttTdV+2qDe43xlADWY9Pj8Mybm bLul8KKtfVqSWC0gwzMNP+5LGQ+qLOd2TjChN/YNBvizHjUNnXT4nsbZWkufJWyBKgqy aZ0vlQ8wvERB7GVV9/BySmetlNhehmjcfHxlG8yuvztR+oqzDGCjxBmmkTmqz54BzA+H QWXtj9teAKYOO2hjqFjXMvpHH9c9TeikHQjd4cWRK3NMdMjbN3I0aXBPEOG7HeItJUwp HeP8edYCAFNLYweOS3WkUGj3n2qf2mkYVAMVAjl1h9+32m/oSZTQPRbKD6L9yT2avZEC WqNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Q4b7l3el; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a1709063ac200b0073d8f141e76si1217036ejd.130.2022.11.17.13.43.04; Thu, 17 Nov 2022 13:43:26 -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=@google.com header.s=20210112 header.b=Q4b7l3el; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240831AbiKQVSU (ORCPT + 92 others); Thu, 17 Nov 2022 16:18:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240440AbiKQVR3 (ORCPT ); Thu, 17 Nov 2022 16:17:29 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6689984334 for ; Thu, 17 Nov 2022 13:15:55 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id y203so2985953pfb.4 for ; Thu, 17 Nov 2022 13:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O7lCHfRItoVgEuH12a2Mks7lBSPSXZSQzuXgs8OSirI=; b=Q4b7l3elIhePbNo4ocmXOKzQ9mQpM0uyG0mfme5yue9qWYKZgzmj8YwNgz/WsoVPNN S5PQx5tzK/LK2Ec2FQRMN+rx7iQUhyzMoPyRXVZsTZ9IBMbqBxRa6Ts6LRBacGdYp4My /k+ScWuqhACCUU+MthvvG/HbFqoGmT1bo25V7F8Vin+G2Mo6v1vgslyiXaWG1buWZxdJ hfsOenUyGIFCl+lG3OcZ1qC26keIzL0UPL5vtQk2hgOO+dqJhqNfVAzz68AkxcteDn4y bf0zCztptbocL+HtVZvPNMh6rrPAWLdIxAhdapOpV7xlz/wslYgvgGJF90vyd0CQyNge Mstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O7lCHfRItoVgEuH12a2Mks7lBSPSXZSQzuXgs8OSirI=; b=MLHKICm95DWVd5Kf6pd2nox8TZuQJFYPmjoY7H5nGJcUnXVm7Y0ZAIpRJsB8Nn4q4i 4scMM5aEx9sudtH8r/jpE2DCw6Wx3FFEaAj+sHRQvIf+FJFexyk9aQ5nbEmlJ5aOjEoo ngt+U1ynieY3d/AGy/wPPkQP1K2+vgeF4P496gZVVwT2DVPutoXe5IX+7dKv3TXz4Fo2 hF12rez9NyPlYBD9XfnT9L+uyyG8Hr2BrxXx+HGudmwe+Rq6T9gLBGZt7ucKUejd2L2i +EvJ7mH9qqXAhTunry5hzr64dHeOvKhnQRIzTJCzE4A37WepwvbT5+o59YOzsO+dU5I2 mV7Q== X-Gm-Message-State: ANoB5pkWCWWz0ZrkWeS5rMUOfJhhwtlElT8kZAE9aiEZStewtfvGepHt /RO5SnrNId5GAhveiCFpOcgrRA== X-Received: by 2002:a63:117:0:b0:476:f43d:913e with SMTP id 23-20020a630117000000b00476f43d913emr3707293pgb.386.1668719754196; Thu, 17 Nov 2022 13:15:54 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id x12-20020a17090a46cc00b0021877447313sm1650957pjg.24.2022.11.17.13.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 13:15:53 -0800 (PST) Date: Thu, 17 Nov 2022 21:15:50 +0000 From: Sean Christopherson To: Mathieu Desnoyers Cc: Andy Lutomirski , Peter Zijlstra , 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> <2f191ddb-de89-52c0-e7da-26ac0239b8fe@efficios.com> <273f4883-25bc-44ad-9c35-3950ca8a3fcf@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 17, 2022, Mathieu Desnoyers wrote: > On 2022-11-17 14:10, Sean Christopherson wrote: > > On Thu, Nov 17, 2022, Mathieu Desnoyers wrote: > > > On 2022-11-14 15:49, Sean Christopherson wrote: > > > > On Fri, Nov 11, 2022, Mathieu Desnoyers wrote: > > > > > On 2022-11-10 23:41, Andy Lutomirski wrote: > > > > > > On Thu, Nov 3, 2022 at 1:05 PM Mathieu Desnoyers > > > > > > wrote: > > > > > > Also, in my mind "virtual cpu" is vCPU, which this isn't. Maybe > > > > > > "compacted cpu" or something? It's a strange sort of concept. > > > > > > > > > > I've kept the same wording that has been introduced in 2011 by Paul Turner > > > > > and used internally at Google since then, although it may be confusing if > > > > > people expect kvm-vCPU and rseq-vcpu to mean the same thing. Both really end > > > > > up providing the semantic of a virtually assigned cpu id (in opposition to > > > > > the logical cpu id on the system), but this is much more involved in the > > > > > case of KVM. > > > > > > > > I had the same reaction as Andy. The rseq concepts don't worry me so much as the > > > > existence of "vcpu" in mm_struct/task_struct, e.g. switch_mm_vcpu() when switching > > > > between KVM vCPU tasks is going to be super confusing. Ditto for mm_vcpu_get() > > > > and mm_vcpu_put() in the few cases where KVM currently does mmget()/mmput(). > > > > > > I'm fine with changing the wording if it helps make things less confusing. > > > > > > Should we go for "compact-cpu-id" ? "packed-cpu-id" ? Other ideas ? > > > > What about something like "process-local-cpu-id" to capture that the ID has meaning > > only within the associated address space / process? > > Considering that the shorthand for "memory space" is "VM" in e.g. "CLONE_VM" No objection from me for "vm", I've already had to untrain myself and remember that "vm" doesn't always mean "virtual machine" :-) > clone(2) flags, perhaps "vm-cpu-id", "vm-local-cpu-id" or "per-vm-cpu-id" ? I have a slight preference for vm-local-cpu-id, but any of 'em work for me.