Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1269528pxb; Thu, 21 Oct 2021 20:01:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQf7AzU0nbi6hTDWnwbpryAXuBCOBnAOhmlNdUtQyo0MNeS7fU/QN2Zkx14tR3jZOAgqLW X-Received: by 2002:a63:4c5c:: with SMTP id m28mr7279907pgl.67.1634871667627; Thu, 21 Oct 2021 20:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634871667; cv=none; d=google.com; s=arc-20160816; b=oVBED+uOSUE0zed9TocemtaLmkdtj3zoFO68OWjzlapI8xae5RT2gP2wBg4TQhW+g1 /du962Il6SNLmbtcmPkm9qlc5eqq+Qh+IcLLphz+cc38g3RoJ44aObg27SmWiOwBY1Ta PZryz4QMq8z7iQ2hCA4wfAdl/CAub/nXUdWq+QFNJPjDOOQulid5+lpachKJl1nu4u5e Uoc6LXUbEs1vw2aJ+e5hGzV4FdcMQFn/aXIHrWkiSe7mzWBb5Qz268bCuBxpobDOrQG7 89gxBfNZ+n4+W2dNpaaH/ZXdnBkf5dkP0v1Tp9RTjyu/2uL23bpeW3dZcMLnKHMzS/i1 Av4A== 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=pA/HmId+eNoYruSgzQgEEwqyozu7A5Jlvi2lx7zeXSs=; b=pRz4OH55rqQeFT76mENYuWIU4CvO8Sdys0TL9a0zb8yqyM4kG/0kxe4ltm9Tr/Upgb wS0jGB8ZuJJgIvhqp27GF31gL+lld6WYoj6ZFQSVJZAK0Yr/atK8y+9H91LeWpEEah/L G6v/RgQUuPWBrkLEYGoPLDbJv7VxL3HAkao+Reh26xVMXyf4wajoUm6K6hDDW18KTjq6 Q/rCwhF3Loydqv4OYG91NVDcCt2Kq5lLc/wQK46+6aXeb3JtZHSfZ2ayoZjj3Ei8oSIm yRD0AapoggzY13DHKggxbD/qGee0Toc/f6uu5VJCq9IpNni9dpCzkZj7LasaXooOvZto Rksw== 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 m18si9180511pgl.218.2021.10.21.20.00.52; Thu, 21 Oct 2021 20:01:07 -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 S232753AbhJVDBs (ORCPT + 99 others); Thu, 21 Oct 2021 23:01:48 -0400 Received: from mx24.baidu.com ([111.206.215.185]:50834 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232719AbhJVDBj (ORCPT ); Thu, 21 Oct 2021 23:01:39 -0400 Received: from BC-Mail-EX08.internal.baidu.com (unknown [172.31.51.48]) by Forcepoint Email with ESMTPS id D41EB5A03CA4A1B0F532; Fri, 22 Oct 2021 10:59:20 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX08.internal.baidu.com (172.31.51.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Fri, 22 Oct 2021 10:59:20 +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; Fri, 22 Oct 2021 10:59:19 +0800 From: Cai Huoqing To: CC: Cai Huoqing , Bernard Metzler , Doug Ledford , Jason Gunthorpe , "Davidlohr Bueso" , "Paul E. McKenney" , "Josh Triplett" , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Ingo Molnar , Daniel Bristot de Oliveira , , , Subject: [PATCH v3 5/6] trace/osnoise: Make use of the helper function kthread_run_on_cpu() Date: Fri, 22 Oct 2021 10:57:08 +0800 Message-ID: <20211022025711.3673-6-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211022025711.3673-1-caihuoqing@baidu.com> References: <20211022025711.3673-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex28.internal.baidu.com (172.31.51.22) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace kthread_create_on_cpu/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