Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp574868pxb; Thu, 21 Oct 2021 05:31:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ+kFgx5CeIr7mmOhZTt05DyJ5klhnOPq7EQ/QEtdspOPgSEUk2cDZir4ZwZPHe7bm4Uo+ X-Received: by 2002:a50:ec0f:: with SMTP id g15mr7164742edr.47.1634819481124; Thu, 21 Oct 2021 05:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634819481; cv=none; d=google.com; s=arc-20160816; b=dxVe2YwlbZk9FRIn/+qDxbWdwvGv+12MVvZMIP/3tV4ruj4ppajaXc5ziAwXDmocoW WoEgxo4XJrciXqjvkYU1OIr4lcv4B01hDx0B0TKHlUGZGaNIkh94602C9F8x0a60ivZQ H6tIBjbXoGuiLLXpoILGf7n03rjFIpctJxkkL0skQSHEI7ZwaE8EcY5RXVk8Wxgq+No6 nbgOFE0LW8EqIbIi2FaP+BVos12aAiq+WwZ4xviZ3rdmfIYtpCkaP2xnkl4s/wpcP+P9 2HgIf4ef0dIKXRxjOuKeIFh/0ExMIpFkIxkl0IRSbDgr7P1jvv32tm6VV3dVxocGKCEr EjeA== 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=1H1VJNot4MxxX7D3iWj48hoLym+oN68V279RAwqPgCM=; b=x2AWbgQyMh6HtSkv0OVDt4cXgiwAVziOUciYYt4ooWyaZcsaYNBbDOomyMP5CaMrZX o0H+ACpUXVQs9BdqnzzXxKselLMEfm0MKgnUD4LRfao3/z12QYgHZDtBEgrTY53SG0lO bKGo6BwVAKQyic19cF21jLGBPLfERNakFH7yMftithQOpCuzfCLE1B6emjtAfZtqiAe1 HqraS7RT+bBw0FhXC7zkm7MW+ntpvznhBUWHQJXwIqk4d3VDtFP7r8gVGeUTxSvMcWpU s0fe0395zfxuKZMSuJYSQWZlGvibiQ0t6/gVedO8iOk+CyBFpqTvvzfBKwzmavfoQA9d x9FA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq24si8322669ejc.20.2021.10.21.05.30.56; Thu, 21 Oct 2021 05:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbhJUMat (ORCPT + 99 others); Thu, 21 Oct 2021 08:30:49 -0400 Received: from mx24.baidu.com ([111.206.215.185]:42312 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231741AbhJUMao (ORCPT ); Thu, 21 Oct 2021 08:30:44 -0400 Received: from BC-Mail-Ex24.internal.baidu.com (unknown [172.31.51.18]) by Forcepoint Email with ESMTPS id A9B476C16AA00DCA42AD; Thu, 21 Oct 2021 20:28:26 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex24.internal.baidu.com (172.31.51.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 21 Oct 2021 20:28:26 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 21 Oct 2021 20:28:25 +0800 From: Cai Huoqing To: CC: Bernard Metzler , Doug Ledford , Jason Gunthorpe , Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , "Steven Rostedt" , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Ingo Molnar , Daniel Bristot de Oliveira , , , Subject: [PATCH v2 5/6] trace/osnoise: Make use of the helper macro kthread_run_on_cpu() Date: Thu, 21 Oct 2021 20:27:56 +0800 Message-ID: <20211021122758.3092-6-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211021122758.3092-1-caihuoqing@baidu.com> References: <20211021122758.3092-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex10.internal.baidu.com (172.31.51.50) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Repalce kthread_create_on_cpu/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- v1->v2: Update changelog. kernel/trace/trace_osnoise.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index ce053619f289..cbd78fd5e491 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1525,7 +1525,7 @@ static int start_kthread(unsigned int cpu) #else snprintf(comm, 24, "osnoise/%d", cpu); #endif - kthread = kthread_create_on_cpu(main, NULL, cpu, comm); + kthread = kthread_run_on_cpu(main, NULL, cpu, comm); if (IS_ERR(kthread)) { pr_err(BANNER "could not start sampling thread\n"); @@ -1534,7 +1534,6 @@ static int start_kthread(unsigned int cpu) } per_cpu(per_cpu_osnoise_var, cpu).kthread = kthread; - wake_up_process(kthread); return 0; } -- 2.25.1