From patchwork Wed Mar 23 15:22:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFyay1QSyBUc2FpICjolKHmspvliZsp?= X-Patchwork-Id: 12789836 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F37A0C433EF for ; Wed, 23 Mar 2022 15:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Xn/Kh9BDmddmSn2c9FGrbV1fA1xaULSJ82KZCt44kG0=; b=Tgl+1tFYUrugg4 0QtWC/yN1mBER5vqWg0jXj8VelSfoEb0QC3p4v/ar7ayQTNWQDFUQ0pWGnETrmcHcwGNiVO8nAXSZ cu3KnP3VE6XF4mip+QwQ0OSGMPBfbi2YFgQqoP8GXHTtVTdANwQExsKyx0dxcwmatTunS8y3DkkkZ HEZQMzjNFRiUofpr3jCSygK7FcjBksBM1x/WaeuZO+zTOqZM0hQkKhuNqTZ19ezvUX7faFkDHkTJN O80ch+DDpFQ7zXUcR1vho3ntt9Gjj6IH7MTZYjxEdVf+0FPdNNSmKNcCLpLTn/YLW3251jGwuP4KQ BNcMe8GZNn1cbDhuj+mQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX2q1-00E4xw-Gz; Wed, 23 Mar 2022 15:23:53 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX2pQ-00E4jv-B8; Wed, 23 Mar 2022 15:23:18 +0000 X-UUID: b74d6884eb1a453399c9eb8b02f005ab-20220323 X-UUID: b74d6884eb1a453399c9eb8b02f005ab-20220323 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 366619251; Wed, 23 Mar 2022 08:23:03 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Mar 2022 08:23:01 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Mar 2022 23:23:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 23 Mar 2022 23:22:59 +0800 From: Mark-PK Tsai To: , CC: , , , , , Subject: [PATCH v3 0/2] tracing: make tracer_init_tracefs initcall asynchronous Date: Wed, 23 Mar 2022 23:22:55 +0800 Message-ID: <20220323152257.7871-1-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220323_082316_458447_AC23FA75 X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move trace_eval_init() to subsys_initcall to make it start earlier. And to avoid tracer_init_tracefs being blocked by trace_event_sem which trace_eval_init() hold [1], queue tracer_init_tracefs() to eval_map_wq to let the two works being executed sequentially. It can speed up the initialization of kernel as result of making tracer_init_tracefs asynchronous. On my arm64 platform, it reduce ~20ms of 125ms which total time do_initcalls spend. Mark-PK Tsai (2): tracing: Avoid adding tracer option before update_tracer_options tracing: make tracer_init_tracefs initcall asynchronous kernel/trace/trace.c | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-)