Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C04A1C636D4 for ; Fri, 3 Feb 2023 14:47:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233436AbjBCOrd (ORCPT ); Fri, 3 Feb 2023 09:47:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233150AbjBCOrb (ORCPT ); Fri, 3 Feb 2023 09:47:31 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id A0A109EE01 for ; Fri, 3 Feb 2023 06:47:29 -0800 (PST) Received: (qmail 563062 invoked by uid 1000); 3 Feb 2023 09:47:28 -0500 Date: Fri, 3 Feb 2023 09:47:28 -0500 From: Alan Stern To: Zhu Zhongjie Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: core: hub: fix usb_hub worker blocking drain_all_pages() worker issue Message-ID: References: <20230203072819.3408-1-zhongjiezhu1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230203072819.3408-1-zhongjiezhu1@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 03, 2023 at 03:28:19PM +0800, Zhu Zhongjie wrote: > From: Zhongjie Zhu > > When disconnecting a usb mass storege, if there are a lot of inodes > like 10 thousands files need to be freed, the invalidate_inodes() will > run for a loog time to freeing all inodes, this will block other worker > to run in the cpu, so mark the usb_hub workqueue to WQ_CPU_INTENSIVE to > avoid this situation. Very infrequently this will happen. In the vast majority of cases, the usb_hub workqueue uses very little CPU time. Marking it WQ_CPU_INTENSIVE seems inappropriate. Alan Stern