Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp663180pxb; Thu, 21 Oct 2021 07:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyDUnWdH4RzVsoZThbkxiwEFHNU0KKDW8ct1HjtoRZRlZ+adXM75Qoe/E5oc+3DndnFc79 X-Received: by 2002:a17:906:2bd5:: with SMTP id n21mr7833848ejg.337.1634825472728; Thu, 21 Oct 2021 07:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634825472; cv=none; d=google.com; s=arc-20160816; b=w8QeIawl5rxGldqJ8Idf4cT0JAb7OVTe4Z+a1zcFSs95/L/O46QT1kFfwR0m5ip8Ox KVOLkH7AI6kX7cTMeyCq2YR9hxKHITBK6M0c3f8bt/tuzdczpNcj3FftjfTVTMr26j6V 0vI08K1ubHS/nD7fXNX5nPrsuGhdcTDuEaJHO+JAng4SSWPSj0wyIb1QK/hLQPGPMZSZ +GPSt8Cnk72AAkGafIvdZwRk1mVKdOK+TFsX5Uo1IDduHeBmK3yBzbE+xVnGqUaA1/rW tQVwRErPjrfiiQylPMwq+TT5mURAMopeScdwGsOi+bW6ivmVAcFubDleKeRvKgkDHo89 wdgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iSRi6HTUwt1l/x+K8A6FBAOrORsLZ+Nd29jW3RCz6mo=; b=EevSwc9RdSpf+C23nGVUgxmFFAVaXeOeZNEGFO6KRSqaShqllTh9RmW/e7K0Wrb6bf AOk8umwCuZ2op6Sak/oytsEbLZehDHM2C3fsXuHg78yvnXHMH2pdLWTAEwvYTlC8nVpX qF4vhKAbs3WB0CURyFdiK+y8ExdS9JB9AggykzgYH7y4Ls/92fWPtFx9iHYW+YM8Q4GR hBqewBXEfwJU9EiW17fCMtZo+gkdVchJKiuUvbUERCn0IzdtnabisSh6VjWOo5UseJGr mdkmzYPYQur5+H4OHbEGIgpqCFuay1m4zP4Cpk03LWOnujaA/5oYQyrKSvaEoYslGm8K DeOA== 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 m14si11193955edc.188.2021.10.21.07.10.23; Thu, 21 Oct 2021 07:11:12 -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 S230317AbhJUOKM (ORCPT + 99 others); Thu, 21 Oct 2021 10:10:12 -0400 Received: from mx22.baidu.com ([220.181.50.185]:41234 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229878AbhJUOKK (ORCPT ); Thu, 21 Oct 2021 10:10:10 -0400 Received: from BC-Mail-Ex31.internal.baidu.com (unknown [172.31.51.25]) by Forcepoint Email with ESMTPS id 5EC8FA995A63A3F0F11B; Thu, 21 Oct 2021 22:07:52 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex31.internal.baidu.com (172.31.51.25) 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 22:07:52 +0800 Received: from localhost (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 22:07:51 +0800 Date: Thu, 21 Oct 2021 22:07:55 +0800 From: Cai Huoqing To: Bernard Metzler CC: 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: Re: [PATCH 0/6] kthread: Add the helper macro kthread_run_on_cpu() Message-ID: <20211021140755.GA3448@LAPTOP-UKSR4ENP.internal.baidu.com> References: <20211021120135.3003-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) 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 On 21 10月 21 13:48:15, Bernard Metzler wrote: > -----"Cai Huoqing" wrote: ----- > > >To: > >From: "Cai Huoqing" > >Date: 10/21/2021 02:02PM > >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: [EXTERNAL] [PATCH 0/6] kthread: Add the helper macro > >kthread_run_on_cpu() > > > >the helper macro kthread_run_on_cpu() inculdes > >kthread_create_on_cpu/wake_up_process(). > >In some cases, use kthread_run_on_cpu() directly instead of > >kthread_create_on_node/kthread_bind/wake_up_process() or > >kthread_create_on_cpu/wake_up_process() or > >kthreadd_create/kthread_bind/wake_up_process() to simplify the code. > > I do not see kthread_bind() being covered by the helper, > as claimed? rcutorture, ring-buffer, siw are using it in > the code potentially being replaced by the helper. > kthread_bind() is best to be called before thread starts > running, so should be part of it. Hi, kthread_bind() is already part of kthread_create_on_cpu which is called by kthread_run_on_cpu() here. Thanks, Cai. > > Thanks, > Bernard. > > > >Cai Huoqing (6): > > kthread: Add the helper macro kthread_run_on_cpu() > > RDMA/siw: Make use of the helper macro kthread_run_on_cpu() > > ring-buffer: Make use of the helper macro kthread_run_on_cpu() > > rcutorture: Make use of the helper macro kthread_run_on_cpu() > > trace/osnoise: Make use of the helper macro kthread_run_on_cpu() > > trace/hwlat: Make use of the helper macro kthread_run_on_cpu() > > > > drivers/infiniband/sw/siw/siw_main.c | 7 +++---- > > include/linux/kthread.h | 22 ++++++++++++++++++++++ > > kernel/rcu/rcutorture.c | 7 ++----- > > kernel/trace/ring_buffer.c | 7 ++----- > > kernel/trace/trace_hwlat.c | 6 +----- > > kernel/trace/trace_osnoise.c | 3 +-- > > 6 files changed, 31 insertions(+), 21 deletions(-) > > > >-- > >2.25.1 > > > >