Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4295708ybp; Mon, 7 Oct 2019 06:25:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBl7QNdAF7ahKmfW5I2hBRj+uDSr25QkjUT+PlGKlicQ/iLzQH/dvOOp3smeqBj2dhN1P9 X-Received: by 2002:a17:906:f259:: with SMTP id gy25mr24080531ejb.2.1570454757040; Mon, 07 Oct 2019 06:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570454757; cv=none; d=google.com; s=arc-20160816; b=eh/RTgwDcXwviPRK0y3hgOjQiK/DnH4S3Y5X4+PUElv4uGUJLSoA+yKHs2rNlfGkXi tk92S1wgvjc2HZyyvSlYkYKm2cTQ5ZW03nFeyvjjNAMRK9whDDzRW0aQ9UCjmJOsL1Kb zHkr92S/eEuMpgroa6c60/NF7ReJoElxwpN8BaLXVnpvwe5CdcCk26QM6gIgHlqdHA6d feGKrjPTsg7CZBHjtHpwhwXNMI7bFM4o3+QTguPw5LYIqhjHvS3PDVPdqqvWysXiDxgE AJSDLiHvjCgjZSW+mvZmfqWk4OeN1LeJYusgrkoTPsc76hnjlh+IVXn9o6Abvep/KzmS KirA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=89fRl/DlMc/BkJbtzFXkwGGTnsw0nAwzLkUO4FDJT58=; b=FxOy3x7t5F04MB1qYkSxxx6SqyGUZgqCoYXFbqnoNHMS5dR/YsT13FyIVXkaizPHFL q7eT26/6P/UUynVt1hql2BYzn/w9UJBlEEEnHlpqLbswsiCFUTDFr6qfOEbFVqEBEXEi Wdr+iRtFF/FUa/B7j0R3tTttIqUys69kKkEqWqjAc5DHplcdDRdcZEfX6fsjbPjcbQdb ruofWwSRvqgnU13896WFvYcHx8UQgtJM09rmpcXuuNtl+v7eIHDpYZaxG94QMTpITNCI 6qn/bQN4EnDKVg4DQuQbnWggxwOjfJPPylRZd79e2vfedFS++rlGcG2Yl44gvCMu+qhZ bKBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d19si7035792ejr.163.2019.10.07.06.25.33; Mon, 07 Oct 2019 06:25:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728139AbfJGNZP (ORCPT + 99 others); Mon, 7 Oct 2019 09:25:15 -0400 Received: from mga17.intel.com ([192.55.52.151]:55469 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbfJGNZO (ORCPT ); Mon, 7 Oct 2019 09:25:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2019 06:25:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,268,1566889200"; d="scan'208";a="206409797" Received: from linux.intel.com ([10.54.29.200]) by fmsmga001.fm.intel.com with ESMTP; 07 Oct 2019 06:25:13 -0700 Received: from [10.251.30.58] (kliang2-mobl.ccr.corp.intel.com [10.251.30.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 9C5EF5803E4; Mon, 7 Oct 2019 06:25:11 -0700 (PDT) Subject: Re: [PATCH 1/3] perf/core: Provide a kernel-internal interface to recalibrate event period To: Paolo Bonzini , Like Xu , kvm@vger.kernel.org, rkrcmar@redhat.com, sean.j.christopherson@intel.com, vkuznets@redhat.com, peterz@infradead.org, Jim Mattson Cc: Ingo Molnar , Arnaldo Carvalho de Melo , ak@linux.intel.com, wei.w.wang@intel.com, kan.liang@intel.com, like.xu@intel.com, ehankland@google.com, arbel.moshe@oracle.com, linux-kernel@vger.kernel.org References: <20190930072257.43352-1-like.xu@linux.intel.com> <20190930072257.43352-2-like.xu@linux.intel.com> <6439df1c-df4a-9820-edb2-0ff41b581d37@redhat.com> From: "Liang, Kan" Message-ID: Date: Mon, 7 Oct 2019 09:25:10 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6439df1c-df4a-9820-edb2-0ff41b581d37@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/7/2019 8:01 AM, Paolo Bonzini wrote: > On 30/09/19 09:22, Like Xu wrote: >> -static int perf_event_period(struct perf_event *event, u64 __user *arg) >> +static int _perf_event_period(struct perf_event *event, u64 value) > > __perf_event_period or perf_event_period_locked would be more consistent > with other code in Linux. > But that will be not consistent with current perf code. For example, _perf_event_enable(), _perf_event_disable(), _perf_event_reset() and _perf_event_refresh(). Currently, The function name without '_' prefix is the one exported and with lock. The function name with '_' prefix is the main body. If we have to use the "_locked" or "__", I think we'd better change the name for other functions as well. Thanks, Kan