From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51C94C432C3 for ; Sat, 16 Jan 2021 17:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39C4A239ED for ; Sat, 16 Jan 2021 17:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728876AbhAPRMo (ORCPT ); Sat, 16 Jan 2021 12:12:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728426AbhAPRKt (ORCPT ); Sat, 16 Jan 2021 12:10:49 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC825C06138C for ; Sat, 16 Jan 2021 07:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=W+j2/cC9bO7SVefvsAQf2Xue8XA7j4g2ZxW25x/Tkm8=; b=C8YsHjSo1Cgwr5G0ikVnOuumCd EX9SFualxezBIeCMruNTzdiaMw1vYpgM6YhNHjwmkpRLKoF1vyu+l7K0KizUCmolkNzeUl3bEvOss JgroXrBjQjPlJ7ES3TJZ2M84Ebyj34TKV2XRgj1tmYbVNSzMZ/d92gdgBHpW+gypGvTohp56E2GpM Kf5xllvUc0f8PWiCOKLRyNe7Xkx1hUcJATavysxSXZbQ30XTQ46KSjDw/0cIqaikedcH7RB3I/Met sd3L44x4wGA0oRFS0cSO4CHJOIEGAv9ivGMjKMAHS2fRto9qZLvrejqoOuYDShIWYCrQFCcUzmes1 6kfSOc5A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l0nGW-00AOLR-00; Sat, 16 Jan 2021 15:13:26 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 04CE33010CF; Sat, 16 Jan 2021 16:13:20 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E633D20299B4E; Sat, 16 Jan 2021 16:13:20 +0100 (CET) Date: Sat, 16 Jan 2021 16:13:20 +0100 From: Peter Zijlstra To: Lai Jiangshan Cc: Valentin Schneider , Ingo Molnar , Thomas Gleixner , LKML , Qian Cai , Vincent Donnefort , Dexuan Cui , "Paul E. McKenney" , Vincent Guittot , Steven Rostedt , Tejun Heo Subject: Re: [PATCH 3/4] workqueue: Tag bound workers with KTHREAD_IS_PER_CPU Message-ID: References: <20210112144344.850850975@infradead.org> <20210112144843.849135905@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 16, 2021 at 01:45:23PM +0100, Peter Zijlstra wrote: > On Sat, Jan 16, 2021 at 02:27:09PM +0800, Lai Jiangshan wrote: > > I feel nervous to use kthread_park() here and kthread_parkme() in > > worker thread. And adding kthread_should_park() to the fast path > > also daunt me. > > Is that really such a hot path that an additional load is problematic? I think we can remove it. It would mean the kthread_park() from the online callback will take a bit longer, as it will have to wait for all the works to complete, but that should not be a fundamental problem.