Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1269964pxb; Thu, 21 Oct 2021 20:01:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaIFhAR9JLhXNZ6HuagZ2wr7WzJR0aUbR+ANX+Y+ypKMwb1YTUNYxXbwAO7B1EvNGeA6gW X-Received: by 2002:a17:90b:1d0a:: with SMTP id on10mr11306854pjb.218.1634871711985; Thu, 21 Oct 2021 20:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634871711; cv=none; d=google.com; s=arc-20160816; b=FfNXEiBav5mROuObu5sUzqZdlBM3IZp3n/UsWJWEpqxPb6iKdjzEZRnhflu9PRNwKw II+XNgAUwJYtzEDqXGQuBRq6xYHVbsVEjqrQmbhrr+GqVefAwu1XOWaDGiwsznD87K5E Mix1KjTUcl/XO7Wbm0Zr2bkuRYQSdweL4ek6cOpVuba7uK+68P59kNUS/jnHfE7r6JZG gW//kpc8UfFWD1zVrMPAicmTDBe5n2ocwXsK2oFC2viJLKIkBkglfkzu9CTU9SvA59p9 EUOSPRLnvyOF3hmYZNqfvYC7FEJT+CiHwkRHXUmXK7bPnXnyXOp0P5keckxcUPZiPICN 9Hxg== 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=Vwhy2TamWVoYFE01UQslnGvo2PchADubM4y3iTO70Qk=; b=mj+LFbTih9OoiNa5q4AJjNRl4rwpxySTQSpNUEn8mI4CyGG/TBNzQP0JuPYfuPNR0V 9YY4dXvFTV6g5lrdruNaYTukC0NKwJ+3V4kXHglNvagQ+ndWPqN7jBxSPf04vhMt3kD1 ZAsdUlwD4fi+tMEK5MtT4//A0OgXiYrrMU3XaD4+EI+uztG2zsbrDoylzon/nB7X8f1I bUAJKKoUddlKoHZUSSUpnH0z7bVgQwrwtzSylLQHYltP/Fl0ULACCTmnCap58A6XX9g3 t5/ruNIeHLni4CV8NmXaLaWPPmLjizIWYp5s+VDBT0ByVkamf3YDW6Ku9ZsO1lMnMCc+ 2YKQ== 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 r18si9659616pgm.166.2021.10.21.20.01.29; Thu, 21 Oct 2021 20:01:51 -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 S232706AbhJVDBh (ORCPT + 99 others); Thu, 21 Oct 2021 23:01:37 -0400 Received: from mx24.baidu.com ([111.206.215.185]:50476 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232673AbhJVDBc (ORCPT ); Thu, 21 Oct 2021 23:01:32 -0400 Received: from BC-Mail-Ex06.internal.baidu.com (unknown [172.31.51.46]) by Forcepoint Email with ESMTPS id CD3A3B9D11194F42EE09; Fri, 22 Oct 2021 10:59:11 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex06.internal.baidu.com (172.31.51.46) 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:11 +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:10 +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 2/6] RDMA/siw: Make use of the helper function kthread_run_on_cpu() Date: Fri, 22 Oct 2021 10:57:05 +0800 Message-ID: <20211022025711.3673-3-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/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- drivers/infiniband/sw/siw/siw_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c index 9093e6a80b26..e5c586913d0b 100644 --- a/drivers/infiniband/sw/siw/siw_main.c +++ b/drivers/infiniband/sw/siw/siw_main.c @@ -98,15 +98,14 @@ static int siw_create_tx_threads(void) continue; siw_tx_thread[cpu] = - kthread_create(siw_run_sq, (unsigned long *)(long)cpu, - "siw_tx/%d", cpu); + kthread_run_on_cpu(siw_run_sq, + (unsigned long *)(long)cpu, + cpu, "siw_tx/%u"); if (IS_ERR(siw_tx_thread[cpu])) { siw_tx_thread[cpu] = NULL; continue; } - kthread_bind(siw_tx_thread[cpu], cpu); - wake_up_process(siw_tx_thread[cpu]); assigned++; } return assigned; -- 2.25.1