Message ID | 20221109094434.84046-2-wangwensheng4@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp243997wru; Wed, 9 Nov 2022 01:52:37 -0800 (PST) X-Google-Smtp-Source: AMsMyM4Kzv7rJhZfE7L5VgHWQ/SgjabtfRJ+MuhJ1W0VMjtt0jDXrIdY/G0+OxpChBKAmlzcGPxc X-Received: by 2002:a17:903:41c3:b0:186:dfe6:f25 with SMTP id u3-20020a17090341c300b00186dfe60f25mr58947801ple.47.1667987557213; Wed, 09 Nov 2022 01:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667987557; cv=none; d=google.com; s=arc-20160816; b=swSBYSKCYqU5SCCtBYOx6BRWyW3fS4KJbdGljst4qQSrvAveH83Fzoqr/QQvtZ3gQi S2vgMFsxR/57u1UP/Kafd5JpvNF8zsUvzp2J1pxBQeS3Z2hksnsQ/2npO9xkZhs1Pnqi 8g4ZiA8lm4Tyn096eenrfA6CxRmjiZbhYSD1I1n3uHmAONJ9dPg2JVxWEuI4Zngw05Kh MRjzwqzLH9K755I9GhpKfqoG0jmM8RMQK8lhqXBGG+TZz4CICNJOpYIrQLaszv97BAKh fAu6UYyzgeLYn8dB0THGeeREydMb/nuLf6fkcqQPdVKeS3Q27sjeoA7w7i68lr2oMtgE FO9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=PZNvCU3Ymtnf9fgVZJ7ydhcREOHqsYmmeDoReQpwyxY=; b=N8Zp/caZN885KEbmlOTRLoWRXLWfJWexwFN8svtgHGhe01gUap9Ig6nu4Ma3JQLhzC xe1XtvDKEEgb/3TPa/c4DVpWX36EEWGVbR08EAqSvc5lJtABBpRBcGyIVWKojr1k53c7 xHVP0B17iWtyxUB9FbST5+FBbtvopedN911IjEfbxwK3Se3fGwFopeTtlYzJD7e/A8ve KzZJPLS0vu4thQjjDf5UVmiZMDKkzVRptgIrQSGO5glI+7jQo1WVpjCC6JbDS5W2X8J3 ifJnzwVXb4b0eEr+tLsyfoUE8gp2xCg6LfxJCzn58g4PCDJe3EV5GPQicvUNiGsls/fZ WQdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a65554e000000b0046af247a436si18364865pgr.644.2022.11.09.01.52.24; Wed, 09 Nov 2022 01:52:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbiKIJqQ (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 9 Nov 2022 04:46:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbiKIJqN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Nov 2022 04:46:13 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B04A2315D for <linux-kernel@vger.kernel.org>; Wed, 9 Nov 2022 01:46:12 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N6g851dHdzmVkh; Wed, 9 Nov 2022 17:45:57 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 17:46:09 +0800 From: Wang Wensheng <wangwensheng4@huawei.com> To: <linux-kernel@vger.kernel.org>, <rostedt@goodmis.org>, <mhiramat@kernel.org>, <mark.rutland@arm.com> CC: <xuqiang36@huawei.com>, <weiyongjun1@huawei.com>, <wangwensheng4@huawei.com> Subject: [PATCH -next 1/3] ftrace: Fix the possible incorrect kernel message Date: Wed, 9 Nov 2022 09:44:32 +0000 Message-ID: <20221109094434.84046-2-wangwensheng4@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221109094434.84046-1-wangwensheng4@huawei.com> References: <20221109094434.84046-1-wangwensheng4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749011720618645639?= X-GMAIL-MSGID: =?utf-8?q?1749011720618645639?= |
Series |
Optimize code for ftrace
|
|
Commit Message
Wang Wensheng
Nov. 9, 2022, 9:44 a.m. UTC
If the number of mcount entries is an integer multiple of
ENTRIES_PER_PAGE, the page count showing on the console would be wrong.
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index fbf2543111c0..c571c2813c11 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -7401,7 +7401,7 @@ void __init ftrace_init(void) } pr_info("ftrace: allocating %ld entries in %ld pages\n", - count, count / ENTRIES_PER_PAGE + 1); + count, DIV_ROUND_UP(count, ENTRIES_PER_PAGE)); ret = ftrace_process_locs(NULL, __start_mcount_loc,