Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp678153pxb; Tue, 9 Feb 2021 09:40:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVWkLEbNrJFTodxQTg+8eAXsq3yWKBiIEhsGXgvEMdJ8mxEJXm0/sLaT3iW1OdssMvjcgA X-Received: by 2002:a17:907:767c:: with SMTP id kk28mr22752589ejc.98.1612892431722; Tue, 09 Feb 2021 09:40:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612892431; cv=none; d=google.com; s=arc-20160816; b=dIPZMQe8p1lO6+F8Hqpx3/wNaimSP9bJxC28qnmWN54qpDelxk70Gj9gXNSK861WzG FrI+ctYLHdlis6jw2AB429ALJDDbmg/oeXSoxjj4yw842ccihx46tUAG5oqbQWcTVU2S oRtZ4rOD3OBUbkZrjIn56eofXIYrO9ByokdjNPfUQ+GnwN3A27Iw11BHy1fIMGZYwKkN +5+XCb3AuLCDjXCCO1jAiXDqlCFpwLoo0Af7PQ/xIf2SFzW/FNiduTmZ696ttIRf5YPH 2Mf/0lz9hIiYxPiHNG6Oz7U/8F+RSmNq8VXjNuY0779igENf2zyx7/8ESFVNaJFF3onM zavg== 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=r47X2ee78t2SLXgVN2ZcRb271S7UdHkQrq/tHAJkSkQ=; b=B54C4gY+cPIW/TfMic9arI2av1ASg/AZflRJq382fhoFl2JQXFxqDXly2fk7Y+9Q3Z 0GDqdg/v/87PIYL3zXLVhzO1fyi/sVAAm+03w67TeYXfAN4mJCLn/S2amoPq4lmHBvXU xhy8u70KE/Pas/S4gp64P5WZYnuju5ZlmIBw7C5kpNLcvTmolpIiISRIofZcKsFt6wVE YeLChmwxT3z5pgkJGYZkOHpjSkjR4x3UuHoXM8YSu8xZiJykpMABGWFRAJbM8NDBrlhi el5N3j6e06P/Xm4A/Xvy60R9tg+Zhj6Q3fC1oSnoLg59ziDZhPUK+gTJvn6FzXgV1uwc 4Lig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DbdHfvtj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf6si10796601ejb.132.2021.02.09.09.40.07; Tue, 09 Feb 2021 09:40:31 -0800 (PST) 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=pass header.i=@google.com header.s=20161025 header.b=DbdHfvtj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233327AbhBIRiY (ORCPT + 99 others); Tue, 9 Feb 2021 12:38:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233001AbhBIRgF (ORCPT ); Tue, 9 Feb 2021 12:36:05 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4E43C06121C for ; Tue, 9 Feb 2021 09:35:12 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id e9so10144791plh.3 for ; Tue, 09 Feb 2021 09:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=r47X2ee78t2SLXgVN2ZcRb271S7UdHkQrq/tHAJkSkQ=; b=DbdHfvtjdYzkLF7dfWPsMxV4+Rb4sAagbFEZ6H600ZnICjslL0olfmaPh3ikqvt3zz IbIaV5p9dBs0iiHwb8hQEyrjqTrSQjZ2CmY1ayRrBl7MB4QIeqclo3xX55n4/5GwN6/U oWpwcG/gms/Ddcor+Lj21w1fyMraOH6gTHyPo+mH3N0Wkjl6/bq+DFYHZ72FxKzgbWmw prFvhzQQyH5zj2/6QVE48eRs59m2Y2eOvPsbyDSlj7fij30rdic147MB+jqjPrTmG3qU 8lzeOCzTd8tsOhgld6FHTd7VF915S9PfW1MJAruEwJjjUruv8nfiI/LFbHcgr3cf9Uw8 K0bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=r47X2ee78t2SLXgVN2ZcRb271S7UdHkQrq/tHAJkSkQ=; b=Kag+MtfO+T+Ss3TERhuu2b+KdDL92kjo2zQQ8tKN9JstXtzSksCFEzol+EmZhqzWo4 L3z1H4eyguy0v0rCe5ax7Y1KFgK2h3+oISGERDYyj0wolig1scNLKoiUnP5FYihI68Kv BXlInevKSZUPzX9cMVjy6MBgHmZN2mqKN6CRHR2KZYhAVWARC8DqggWN/YaD9aG9FFUz a+tBkrQrFmatdRq3lIjWHwb4XCce4K5UblhvSQUW9dsiVo0eii+WbCTTtV4ukH9sC8wl aEkZYFf6DqpxtQvK+9bkyBrFQcl07vue/WoFjIf21w3c/1xfp5ipME54ycnSeZqza0eB HsOQ== X-Gm-Message-State: AOAM532o38BdhT2Hj9lfu1LG0nEbv48FRgQRh+fMWppK5EfaDKGi46qt /w5dMtIVsDAwkEd9d25ByxJPIA== X-Received: by 2002:a17:902:c3c2:b029:e1:74f5:6a65 with SMTP id j2-20020a170902c3c2b02900e174f56a65mr21289693plj.46.1612892111477; Tue, 09 Feb 2021 09:35:11 -0800 (PST) Received: from google.com (240.111.247.35.bc.googleusercontent.com. [35.247.111.240]) by smtp.gmail.com with ESMTPSA id b18sm2065pfb.197.2021.02.09.09.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 09:35:10 -0800 (PST) Date: Tue, 9 Feb 2021 17:35:07 +0000 From: Sean Christopherson To: Ben Gardon Cc: "wangyanan (Y)" , kvm , linux-kselftest@vger.kernel.org, LKML , Paolo Bonzini , Shuah Khan , Andrew Jones , Marc Zyngier , Peter Xu , Aaron Lewis , Vitaly Kuznetsov , wanghaibin.wang@huawei.com, yuzenghui@huawei.com Subject: Re: [RFC PATCH 1/2] KVM: selftests: Add a macro to get string of vm_mem_backing_src_type Message-ID: References: <20210208090841.333724-1-wangyanan55@huawei.com> <20210208090841.333724-2-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2021, Ben Gardon wrote: > On Tue, Feb 9, 2021 at 3:21 AM wangyanan (Y) wrote: > > > > > > On 2021/2/9 2:13, Ben Gardon wrote: > > > On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: > > >> Add a macro to get string of the backing source memory type, so that > > >> application can add choices for source types in the help() function, > > >> and users can specify which type to use for testing. > > > Coincidentally, I sent out a change last week to do the same thing: > > > "KVM: selftests: Add backing src parameter to dirty_log_perf_test" > > > (https://lkml.org/lkml/2021/2/2/1430) > > > Whichever way this ends up being implemented, I'm happy to see others > > > interested in testing different backing source types too. > > > > Thanks Ben! I have a little question here. > > > > Can we just present three IDs (0/1/2) but not strings for users to > > choose which backing_src_type to use like the way of guest modes, > > That would be fine with me. The string names are easier for me to read > than an ID number (especially if you were to add additional options > e.g. 1G hugetlb or file backed / shared memory) but it's mostly an > aesthetic preference, so I don't have strong feelings either way. I vote to expose/consume strings, being able to do ".dirty_log_perf_test --help" and understand the backing options without having to dig into source was super nice.