Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4462699rwr; Sun, 23 Apr 2023 06:17:42 -0700 (PDT) X-Google-Smtp-Source: AKy350aZ0DlrmjSaHC2IS2sPFZnu1083TkEl1BnTv1CCTN1cKIFItBk87ZXIeiL3rjlcvymJekZA X-Received: by 2002:a17:902:ec8f:b0:1a9:665f:8a19 with SMTP id x15-20020a170902ec8f00b001a9665f8a19mr3728594plg.5.1682255861728; Sun, 23 Apr 2023 06:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682255861; cv=none; d=google.com; s=arc-20160816; b=miiSn/FOnhz/1BMR9W2bm/wIDxPvKyffU5tBywqGMwnjhOoObiJ5rqJmbLqAojum0S xlGSoEfgbjWTiTQgMCWEdyv8/MNFJiE96OeP48+Vh6XIqJkXEXp267zW8kp+6KfoTgUH IKhkaNxXmYCdJNfnamV7NEJmxdTm0Ei8QZBA1xxgE7kp4bre0mzlpngiNRbd1VJu7xcy UJ5dCsI5SmDjGz2nsY3PODCmvZ6XombuEcN7TQrJMaAkp8Er0TWrC8b3pEs+I58/Of3E uaBRtM1UA/ZOhlMP1vR8RMsux/jYqE4WDbSN8FMhMPJLHjFkji6fwFlQlspFp9nRjigl 69yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=iUcUXXwjrGITrbnz009DjYEeAhP56EYqUlxvUvV5vVE=; b=j9pxU2eFKQzexwN8cTODRDt0GwTOwabpiHCFEA8KaM7K9JrxBNK/82yF4dCSxBMjuP BEx/KUSjyuaL8pyMTUh+0OsFaD1+Gq8mCybv8h4SZNORHW44N14zj1rUEt/KNStb2+7X rjpGxAs2yNIjCTZdtREuIJVfUP1DcoSXNBSxz4hwoGiwFkLLKArcwI3lN8YwCajBgY+s tNkmDJ43QIbZGoywb6s9kj1U+VQQjo83y0PcSaOLmYBTbMKvHrP7FIEYSRiqo/bBWqg9 uX1RX05InidY8oH1To/BEf0VanZ/wVYccP8lKWQCjYf/0Ho1KpjjK1v9hYDcyLCxYPdU iufQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QLGo7Ri/"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020a1709026e1600b001a95b85b09esi3962034plk.578.2023.04.23.06.17.28; Sun, 23 Apr 2023 06:17:41 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="QLGo7Ri/"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjDWNO1 (ORCPT + 99 others); Sun, 23 Apr 2023 09:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjDWNO0 (ORCPT ); Sun, 23 Apr 2023 09:14:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5388F1727; Sun, 23 Apr 2023 06:14:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E1D4460D37; Sun, 23 Apr 2023 13:14:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B309C4339B; Sun, 23 Apr 2023 13:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682255664; bh=HvLzjTfKystbI6xwFWfI2Z3fVftEGxsyI7r7TjKcIWM=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=QLGo7Ri/mTfb2D1qw5zFrq3ci3jEUQsakRNlBYrVJerCA7UQ/JBqo7H4WG5/V5zsk tpZ3p3hAXnQXjglp5Jr2fmRbLEcTDRCPn3vCRsjgPf4L1oJndpE/cygq1gObsIZLq+ 3lBebzxAfNq2ZbIPA9UKc2Xds/VLACYJx6sLZXpIVcHHlogES41s4WZ77YeUEIwyhP JrI0MXS3wzSWyCzamJlg3Bb0h8n68YWTM01yANXWDMxY5alPHPrcLm6aiDPRBype8O pIhzKUGsiFUAqNy5079dwknnmZYOjYp0qMdH+tL/Ydd7RJv7gjA48Tk+/uJ/SpgFMu jrl01t9L7frRg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 23 Apr 2023 16:14:18 +0300 Message-Id: Cc: "Paolo Bonzini" , "Vitaly Kuznetsov" , "Jim Mattson" , "Joerg Roedel" , "Maciej S . Szmigiero" , "Vlastimil Babka" , "Vishal Annapurve" , "Yu Zhang" , "Kirill A . Shutemov" , , "Quentin Perret" , , "Michael Roth" , , "Mike Rapoport" , "Liam Merwick" , "Isaku Yamahata" , "Ackerley Tng" , , Subject: Re: Rename restrictedmem => guardedmem? (was: Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM) From: "Jarkko Sakkinen" To: "Sean Christopherson" , "Chao Peng" X-Mailer: aerc 0.14.0 References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon Apr 17, 2023 at 6:40 PM EEST, Sean Christopherson wrote: > What do y'all think about renaming "restrictedmem" to "guardedmem"? > > I want to start referring to the code/patches by its syscall/implementati= on name > instead of "UPM", as "UPM" is (a) very KVM centric, (b) refers to the bro= ader effort > and not just the non-KVM code, and (c) will likely be confusing for futur= e reviewers > since there's nothing in the code that mentions "UPM" in any way. > > But typing out restrictedmem is quite tedious, and git grep shows that "r= mem" is > already used to refer to "reserved memory". > > Renaming the syscall to "guardedmem"... > > 1. Allows for a shorthand and namespace, "gmem", that isn't already in = use by > the kernel (see "reserved memory above"). > =20 > 2. Provides a stronger hint as to its purpose. "Restricted" conveys th= at the > allocated memory is limited in some way, but doesn't capture how the= memory > is restricted, e.g. "restricted" could just as easily mean that the = allocation > can be restricted to certain types of backing stores or something. = "Guarded" > on the other hand captures that the memory has extra defenses of som= e form. > > 3. Is shorter to type and speak. Work smart, not hard :-) > > 4. Isn't totally wrong for the KVM use case if someone assumes the "g" = means > "guest" when reading mail and whatnot. > > > P.S. I trimmed the Cc/To substantially for this particular discussion to = avoid > spamming folks that don't (yet) care about this stuff with another p= otentially > lengthy thread. Feel free to add (back) any people/lists. I guess 'guarded' could be a good noun in the sense that it does not get easily mixed up to anything pre-existing, and it does give the idea of the purpose. BR, Jarkko