Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1269529pxb; Thu, 21 Oct 2021 20:01:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK3Q7iznAW+fC9rGvccr4mhY/mFKx9e/waEd7/oAjXA9FajPmp6jixLOj+X7b91Vijh1di X-Received: by 2002:a17:903:22ce:b0:140:154d:e40c with SMTP id y14-20020a17090322ce00b00140154de40cmr1776797plg.23.1634871667730; 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=b4CCVsoi2Gi58LFWEfGjL1Lns7MDoR7L11BkzoRD5Ytd8D+ETO+ob0qTnW/PbK1b0T ZdjBm0D6L08XV4oY7l9cR3nyWyqufTOdFHDEmLNbKXOskpPoTGTWwoIDuFRWMeTDQXqK VG1rtbzMi9eZ8vg33hQfjWG+gn2EY9P8RdseQ5zeZsbLH4qDwuXRU0G1nE31AxsYHdJu 0XiC70LhPuGiz8qvRiDUjnoaNeaNfLB+9xr20k9heFcUx3T/Ei8L8YtrjiWYh0bK66e+ Zbz0WI9id1yz328PIJCFbcurPwMUQc9CJ+nhLLQMN5l7C14TaNSoJuZ/M209L3y9uqmx Zapg== 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=Az/R5bTNPxSpLdDDnhZyx8dQjVX9xueLntnaf3XSXt8=; b=xp5h1G55ZaKK9OKuYM/+0Q+6vrgSRKmlSdqi55i6J0bsHcTWl8ajNgMxN+mI7HbNrP WPlc3yc9GpNNYGfufk6baKUPhJRIYNTW49tLOPSA0B8rB9wKOqgSrb56wcNi2dH39TvO PMkslSvuDUx3LBco83j4uTOvQSl6OgdIDcTNnFw/N6Pg4J/Jri2SIw6kG2afUW7EaYgz USUa927xSyP2xE3+0gejTExkj+qVEwwpCgyXwkoNQiy4vRJPM1CVwGnNkDiQ8CjkyjBG JxiEHk1OPWLEJFeyeGHtNbz3HRoNPaVUKbD+DxjCgLZic8rwpYtrGHzXTgF1NDyzdTXN q5yg== 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 j8si6317973pgc.215.2021.10.21.20.00.53; 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 S232740AbhJVDBp (ORCPT + 99 others); Thu, 21 Oct 2021 23:01:45 -0400 Received: from mx24.baidu.com ([111.206.215.185]:50704 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232663AbhJVDBg (ORCPT ); Thu, 21 Oct 2021 23:01:36 -0400 Received: from BC-Mail-Ex05.internal.baidu.com (unknown [172.31.51.45]) by Forcepoint Email with ESMTPS id 9D40DBC6B6D4C4BB2983; Fri, 22 Oct 2021 10:59:17 +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; Fri, 22 Oct 2021 10:59:17 +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:16 +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 4/6] rcutorture: Make use of the helper function kthread_run_on_cpu() Date: Fri, 22 Oct 2021 10:57:07 +0800 Message-ID: <20211022025711.3673-5-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_node/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- kernel/rcu/rcutorture.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 503e14e62e8f..6c3ba8c0d7ff 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -2025,9 +2025,8 @@ static int rcutorture_booster_init(unsigned int cpu) mutex_lock(&boost_mutex); rcu_torture_disable_rt_throttle(); VERBOSE_TOROUT_STRING("Creating rcu_torture_boost task"); - boost_tasks[cpu] = kthread_create_on_node(rcu_torture_boost, NULL, - cpu_to_node(cpu), - "rcu_torture_boost"); + boost_tasks[cpu] = kthread_run_on_cpu(rcu_torture_boost, NULL, + cpu, "rcu_torture_boost_%u"); if (IS_ERR(boost_tasks[cpu])) { retval = PTR_ERR(boost_tasks[cpu]); VERBOSE_TOROUT_STRING("rcu_torture_boost task create failed"); @@ -2036,8 +2035,6 @@ static int rcutorture_booster_init(unsigned int cpu) mutex_unlock(&boost_mutex); return retval; } - kthread_bind(boost_tasks[cpu], cpu); - wake_up_process(boost_tasks[cpu]); mutex_unlock(&boost_mutex); return 0; } -- 2.25.1