Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp551950pxb; Thu, 21 Oct 2021 05:04:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr6MBpIpyypTbXRnjPyxUpmDWPmI66eGvd0K1ItSuLiz7scmkIjK5tpvH3gacuFEu8xFAB X-Received: by 2002:a62:1806:0:b0:44c:5c79:59a7 with SMTP id 6-20020a621806000000b0044c5c7959a7mr5000388pfy.22.1634817880721; Thu, 21 Oct 2021 05:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634817880; cv=none; d=google.com; s=arc-20160816; b=CojHXtvuoy53wub05rN0e59Rx357p56zweklBF0DcTvq371r+H+pNA9tCfvaUtTzQy mFGeGM4mUbyJROnFjtDoDDE9tYULBp3K+HFtwzMqm6BqoVDhLfVyQAIAexxCOgRnHS7s piKrgZpLiEqMjPXIzymbe9H3Z7HHiJcKDtFcZ8vSinHUcbD7XmIpAzPIXaIhwZhiJbEj DLgqJrOa2hryKckY6WX/ikmYDS53krkDJG5iucTT3nFQaJoWfD7ZfQAZN77J9p8rYMUX 4fEoNxuLJWWtEaAMAePCB1hPUWpe5xi1mHyl3LY1rxZgvT1x5ZEK9GZj+xz4cT/w2Vus D7fQ== 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=dj8zHPAK3Ay/4Pu4vzGZ13nr7GFD016TQR+NQYysukA=; b=gWWnUJ5ZG0KyG4IBAXTC2Tx2eLHCSC4aIg066fQQHZWYxAP8v14SxDhki5Tpq/IrlN pAIz+qkxFV+4gScB076Chz40ebtb64w+vwPuTg7uP/xeLSsf3vVyeGmH9n4lkK+4oudC yvGyhvKrIxOTdyvNvK7HqS1qwTMHCBh9pY9Pkd3Koj1CaqZIzAVheBGLNpdYaHQ1lcaf zF6NjjF4ovPry+wkudpuCF17gsh0FHi45B8usRItugeyVadThKWtiqc6jMYfJjZyM07g 8ZkWbJIixhBNHG8FuUIwWTHkRuPGOlJ8IBTlAImliurVMQWAcyjhd7arGu8SpOmA4T7Z E7AQ== 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 m126si6447763pfb.100.2021.10.21.05.04.26; Thu, 21 Oct 2021 05:04:40 -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 S231522AbhJUMEq (ORCPT + 99 others); Thu, 21 Oct 2021 08:04:46 -0400 Received: from mx22.baidu.com ([220.181.50.185]:43150 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231530AbhJUMEn (ORCPT ); Thu, 21 Oct 2021 08:04:43 -0400 Received: from BC-Mail-Ex05.internal.baidu.com (unknown [172.31.51.45]) by Forcepoint Email with ESMTPS id 8C50DE88A6AE85055C66; Thu, 21 Oct 2021 20:02:25 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex05.internal.baidu.com (172.31.51.45) 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:02:24 +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:02:23 +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 5/6] trace/osnoise: Make use of the helper macro kthread_run_on_cpu() Date: Thu, 21 Oct 2021 20:01:34 +0800 Message-ID: <20211021120135.3003-6-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211021120135.3003-1-caihuoqing@baidu.com> References: <20211021120135.3003-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-EX04.internal.baidu.com (172.31.51.44) 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/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- 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