From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB20C47404 for ; Mon, 7 Oct 2019 13:25:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B15702173B for ; Mon, 7 Oct 2019 13:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728167AbfJGNZP (ORCPT ); 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