Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3148561pxa; Tue, 18 Aug 2020 07:50:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv7CVLYRwRDGS4sJYbE/HQAPJnDBV4pFELmvPsloSo3PcbzCRlEMIQYPWRqHdUr6VaeJZL X-Received: by 2002:a50:fc02:: with SMTP id i2mr20325292edr.121.1597762206419; Tue, 18 Aug 2020 07:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597762206; cv=none; d=google.com; s=arc-20160816; b=eSwLb8q7J0yddP3Kobmd3AjqzVkTPu3begP6DZ2rZvLGOC83TQEZGfxjkpNxEDln1o C0waU4tewkJ9qkuq8bGiiz0gcrJ/WmFNYfORCWVRiEWJE0/u/cXpXy8dSD0Tc73n2wj9 qJhvnbYy/5O9GZVYGRISUrUfq4bUKfGxrIdr6PAXXbV1oK56z9gg67BH4za8+tpEC3aD vj+GTQdYQnxxVsU0B9IjAAlhwR0JTHX0JAztDAVFO8w91Y7/WHvGfQ1LPdgVW94OKZOc diOac94F+SNTFcK5vGmhpTHX9cOi89Qp6UfdiNjv17R3g7Kds8QqrUdDKIMBfoq5VyZQ 0JTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=S0lVYYAAz7DDlWnJ7QspBM+tJgKpbpjqzlNlh+dMh48=; b=qoZt2uZ6abHfrcgOAEm+NzSNHpGoTiM2/eRSb57NFwnz44Hz8L8XuvmeC8ZqRiLwEo Aev5/AUji1nSGX6eF5nOcy2aGHVKtsitrqrxNyoNFfToZ2qcyW6gsl/RTyRaQA77UwVW MKgpONyWIBeLzzpSTcSfH686vf5ijt26WsMfPO9qm/bWjLWHXBSUJTao2v1vI6CVHjSB QqSvjHRaT816n4bXsw3RixPgNXqx+hu3KNAXTlEzs5Hbs1A8snoyMhbL4WqxTFZcTIhh I1bEtplw85E+ySjPFy+vgC3bNOzwk8ra2UucD/hA9WJftYLVIvttptyb28cQNVd3RWTy bvHw== 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 b18si13277497eds.208.2020.08.18.07.49.39; Tue, 18 Aug 2020 07:50:06 -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 S1727005AbgHROsU (ORCPT + 99 others); Tue, 18 Aug 2020 10:48:20 -0400 Received: from netrider.rowland.org ([192.131.102.5]:56943 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726863AbgHROsT (ORCPT ); Tue, 18 Aug 2020 10:48:19 -0400 Received: (qmail 146374 invoked by uid 1000); 18 Aug 2020 10:48:18 -0400 Date: Tue, 18 Aug 2020 10:48:18 -0400 From: Alan Stern To: Jim Baxter Cc: Greg KH , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-usb@vger.kernel.org, "Resch Carsten \(CM/ESO6\)" , "Rosca, Eugeniu \(ADITG/ESB\)" Subject: Re: PROBLEM: Long Workqueue delays. Message-ID: <20200818144818.GB144306@rowland.harvard.edu> References: <71aafe68-7fe0-6b77-ea8e-83edd3f16c8d@mentor.com> <20200817115744.GA3985908@kroah.com> <57a7841d-86e3-b6df-1488-a252a68a9ee0@mentor.com> <20200817184753.GA120209@rowland.harvard.edu> <1838f2c3-7915-9e5b-3112-6b082b945410@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1838f2c3-7915-9e5b-3112-6b082b945410@mentor.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 11:54:51AM +0100, Jim Baxter wrote: > On 17/08/2020 19:47, Alan Stern wrote: > > > > Unplugging a R/W USB drive without unmounting it first is a great way to > > corrupt the data. > > > Thank you, post development we will only mount the USB stick as R/O. > > >> Using perf Iidentified the hub_events workqueue was spending a lot of time in > >> invalidate_partition(), I have included a cut down the captured data from perf in > >> [2] which shows the additional functions where the kworker spends most of its time. > > > > invalidate_partition() is part of the block layer, not part of USB. It > > gets called whenever a drive is removed from the system, no matter what > > type of drive it is. You should ask the people involved in that > > subsystem why it takes so long. > > > > I included the linux-mm list but missed the filesystem, I will ask the question > to the linux-fsdevel too. What about linux-block? The block layer is different from the memory-management (mm) layer. Alan Stern