Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1134847pxb; Wed, 10 Feb 2021 00:29:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfB1sKf2HW+uHr9LbWwrAN6dbtxl9nYhZiNNepSS4utkoZUtTiEVJapaYvmUK/CpGyxfCx X-Received: by 2002:a17:906:d93:: with SMTP id m19mr1870876eji.212.1612945771657; Wed, 10 Feb 2021 00:29:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612945771; cv=none; d=google.com; s=arc-20160816; b=G3U91IMwZx3Zr0Y9DQPPAOtFUoLK7Yiu2RVbBjJk8t/GojB6xHDHl/Iey22PZ1CpFz EO37aKl3V7NWmnZQJOhfad0yah8rs/8wNkv/JoVTdtvqwbRwElpnxhatx0CxbJp9LnGG wrOyr2d8bNKnw0IjSxvc+FeIm9ig0UTRbrsXwZ6bIHuxUK3L87L9j8a/Dmflw5FUKJPz ke/vx541aaZWwwiyMyodXXqWu4VcXBOvf5Czcw9NAJREuWTkETWVkUt4IFbqQRpOuGTc DGr/PP6TqNylc5erWybY2sLn8iMUdJjzE8p0T3nfe9/RbRB8FgAbP0Sd1xAm/wxeBwDb 2FmQ== 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; bh=Hvvu46UWaXDsIK6ykbaCcApJCxCezCLtWAdR6LPTRD4=; b=NB2zYMcbzaD7+u/PY/N+78UAKZv7aDF30caaDNLm1KpLajC7vlJhOpyfgrAi8l6km8 ATi3nNeMQuj3jBAySiqEgoNdshwguhAWZzWAUcYYvphDQwM1H5rLpFiivOf2fvmDbvUq /aeQ1aZCxOTxvmsmy3lnHR9KsZE22w/va025OIasGgVJQ3/k4UaBTZoIQP3yn7BEHkA3 7v6p2tXnn4yyl6WTVD7Dmi8PIiIL7nRvd1G5fiLf32l80vD556QV1gvfAuxFPl4PhBYV DcPNnryXDzwrfl3HHr+6DFgQqRE0xLgzDr96Zs20zNtv1IZfhFZ4W5oNFWXLDLes3K/g gO3g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si1001150edi.583.2021.02.10.00.29.04; Wed, 10 Feb 2021 00:29: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhBJEM1 (ORCPT + 99 others); Tue, 9 Feb 2021 23:12:27 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:4624 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbhBJEMY (ORCPT ); Tue, 9 Feb 2021 23:12:24 -0500 Received: from dggeme718-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Db5rv0y7TzY6gS; Wed, 10 Feb 2021 12:10:23 +0800 (CST) Received: from [10.174.187.128] (10.174.187.128) by dggeme718-chm.china.huawei.com (10.1.199.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Wed, 10 Feb 2021 12:11:38 +0800 Subject: Re: [RFC PATCH 1/2] KVM: selftests: Add a macro to get string of vm_mem_backing_src_type To: Sean Christopherson , Ben Gardon CC: kvm , , LKML , Paolo Bonzini , Shuah Khan , Andrew Jones , Marc Zyngier , Peter Xu , Aaron Lewis , Vitaly Kuznetsov , , References: <20210208090841.333724-1-wangyanan55@huawei.com> <20210208090841.333724-2-wangyanan55@huawei.com> From: "wangyanan (Y)" Message-ID: Date: Wed, 10 Feb 2021 12:11:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.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.174.187.128] X-ClientProxiedBy: dggeme718-chm.china.huawei.com (10.1.199.114) To dggeme718-chm.china.huawei.com (10.1.199.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/10 1:35, Sean Christopherson wrote: > 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. > . Fine then:), I will make some change based on (https://lkml.org/lkml/2021/2/2/1430), thanks!