From patchwork Thu Oct 5 08:36:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 148736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2016:b0:403:3b70:6f57 with SMTP id fe22csp334393vqb; Thu, 5 Oct 2023 07:24:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHin0gunc1iBSYQcbUGuD8/HttO6kduuZGJcn2GMrFyUK+ARmdezAUf6lx7gvS+TfNvm+OP X-Received: by 2002:a17:902:ab82:b0:1c5:ce3c:c399 with SMTP id f2-20020a170902ab8200b001c5ce3cc399mr5308250plr.39.1696515866439; Thu, 05 Oct 2023 07:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696515866; cv=none; d=google.com; s=arc-20160816; b=dKAzD4Oz8NOTl2KUQEgHOT18lSmONZEWXm5weSR5SqVj4oWHH9la3Fc2jgEllpqDc1 C9GtVUw1hPNzjIzQjBtEbp3j9fIQrFwMkWvsin9CywTi7NvdOQ7QNrVOdSEHNZaVXYiN dzu0uh7vE4mgbhbgReKymjGxoZiHtfk8YEMJY5xaWSEC+kfBCjMgeQc9HJhFRJy9eNqz OqGwempy0GcZJj4sP4vOJMWshxXyvjE7m1PCBGdm0sFXIITKRs9fRZQqghxdgQ3ehHqb PzQ2uc/I/1x+etbyd/ABqyTzgH1XMIUORlu4fVeGXpjAtlgmFe7710Jl2DXN0qQOq8MC +EbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ooaRt6cPAJOEWZihUCK19vSVmC89ZgrQXgZH5+YgVmQ=; fh=KlWNFvauB2LhUV0k0llslZZbRh10QhqhvsiZjOGVHUs=; b=AowOluDWXEkjUtXocoHMwx9vjj8Mj/aj7IHGl7toLob/k+Zln5QB5dP7SYoefDIwd+ hAQ9Tq3zjY0MHMNXUmTwE86+hE5p4iZcJWAXyyd8Ns1ranhDgjYrQy3IOl6cZyIJuy+S K0L+ybQtDj+RYo22rMPjNxKH7SPWd+BGwTS9MN6Bhs43aQoRyh+muypnmT2Dd54eNMLO +6p0B5YCjQlJOmKb66neylFbb3aRPSbIWFOi6zrF0zh6DVuyQmMw7XqWnDAQJ+rgQNQg H72Ji7JJHkmI7AykeuzLo6VUfKAh6F9yldtA7FIL8L7at53w5gOhsDI1N3+PtBQL3KjT snzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=30URau9n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=idzLrwU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e7-20020a17090301c700b001c36705bce1si1517999plh.474.2023.10.05.07.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=30URau9n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=idzLrwU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AE60E8090794; Thu, 5 Oct 2023 07:23:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233137AbjJEOUI (ORCPT + 19 others); Thu, 5 Oct 2023 10:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbjJEORx (ORCPT ); Thu, 5 Oct 2023 10:17:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF5B19003; Thu, 5 Oct 2023 01:36:08 -0700 (PDT) Date: Thu, 05 Oct 2023 08:36:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696494964; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ooaRt6cPAJOEWZihUCK19vSVmC89ZgrQXgZH5+YgVmQ=; b=30URau9nD9DRgr/eTus/cduE+vwu3JLLp/Rerq1dDn3yar14kx82uDrQlcN5qD5bIF9NBh r+jin1kgVrp8Sjd/7WgHUzdfUpYlQ5K3Zdg2esI9fHKullgPFzUI1tLNAXzuG1+ZWWOrT1 6k+UskT63zP+aUnpJUch5hua7VISRwytAMbkleV9zVoslyJZtxEM9BGO/z7VTdJ/yQLaFG Ihc/dgyIbKJp7EPlDVsts+nCqaVd9bYffXYYzoWq5ygECGHz83rrr/AmbhCDjy7wu4cDvg Wrz31Qmsm4pgprlfisO5Ic6oFGjaw2FKq6qacP6w3cxtCo3e0DFd3nrX+B3Kog== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696494964; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ooaRt6cPAJOEWZihUCK19vSVmC89ZgrQXgZH5+YgVmQ=; b=idzLrwU6B6tL0+Cy9XTdGcVN8bSN9hQuaMNz4/d7H75I9k0+4Zzi5yEwqVqcdbgkNQ5ia/ QHNPj3wNz62HvgCw== From: "tip-bot2 for Xiu Jianfeng" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/core: Rename perf_proc_update_handler() -> perf_event_max_sample_rate_handler(), for readability Cc: Xiu Jianfeng , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230721090607.172002-1-xiujianfeng@huawei.com> References: <20230721090607.172002-1-xiujianfeng@huawei.com> MIME-Version: 1.0 Message-ID: <169649496396.3135.9256203796815906807.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:23:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778925821335396614 X-GMAIL-MSGID: 1778925821335396614 The following commit has been merged into the perf/core branch of tip: Commit-ID: e6814ec3ba1994561db9b1c05a80227d30cc18fa Gitweb: https://git.kernel.org/tip/e6814ec3ba1994561db9b1c05a80227d30cc18fa Author: Xiu Jianfeng AuthorDate: Fri, 21 Jul 2023 09:06:07 Committer: Ingo Molnar CommitterDate: Thu, 05 Oct 2023 10:26:50 +02:00 perf/core: Rename perf_proc_update_handler() -> perf_event_max_sample_rate_handler(), for readability Follow the naming pattern of the other sysctl handlers in perf. Signed-off-by: Xiu Jianfeng Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230721090607.172002-1-xiujianfeng@huawei.com --- include/linux/perf_event.h | 2 +- kernel/events/core.c | 4 ++-- kernel/sysctl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index e85cd1c..f31f962 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -1573,7 +1573,7 @@ extern int sysctl_perf_cpu_time_max_percent; extern void perf_sample_event_took(u64 sample_len_ns); -int perf_proc_update_handler(struct ctl_table *table, int write, +int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); diff --git a/kernel/events/core.c b/kernel/events/core.c index 4c72a41..af56919 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -449,8 +449,8 @@ static void update_perf_cpu_limits(void) static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc); -int perf_proc_update_handler(struct ctl_table *table, int write, - void *buffer, size_t *lenp, loff_t *ppos) +int perf_event_max_sample_rate_handler(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) { int ret; int perf_cpu = sysctl_perf_cpu_time_max_percent; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 354a2d2..2b65857 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1983,7 +1983,7 @@ static struct ctl_table kern_table[] = { .data = &sysctl_perf_event_sample_rate, .maxlen = sizeof(sysctl_perf_event_sample_rate), .mode = 0644, - .proc_handler = perf_proc_update_handler, + .proc_handler = perf_event_max_sample_rate_handler, .extra1 = SYSCTL_ONE, }, {