Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1774765ybh; Mon, 20 Jul 2020 07:00:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7ZBV9fXxznNCUE01XO9MyGb5Z32xoZxcAbACtL8aGEUvFREFtO7dNbXmfLRszDI+hZ3CW X-Received: by 2002:a17:906:aac1:: with SMTP id kt1mr22012259ejb.408.1595253631365; Mon, 20 Jul 2020 07:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595253631; cv=none; d=google.com; s=arc-20160816; b=DJgD/fWAUun+M4e8qvL9Kpy9yHpQx31xQoEOVOnHvgdtRzxiXU4V1H8YwXckz6OZrz VPPgpAD8cfWEVwWoCf6Ao/3WHCYNzHWxQO3urCGophBHWsxUo6iQleEiQbOCtWW/VAo2 6VxTDq/B0+VaayywPczUgVSwieUxIUvZo5FOUY5dYCkNbDQc49uh1Ge+62O6Y55gRszl SZNXmKJCJvMIN4VAA8raumD0osqs7MVlLvQeizZGGEWcon+mawOKBbse1X1A0GDXum2j M+bAwKCaWxMUo5nFfmbxXkHsbjO2SoCoYuFJBX43kKOYOzDY11kSkY83WBn05TNMQtQR V3lA== 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=FCsoUMdOw6C3R9wz1JxrHtKLwkOPnIYQma+qeIMTOw4=; b=ZWXq+AuKXRmc346NE1Agb234dp+zXk2klH/gaHdNlEmn9q0lTUHJymBtkrfK+wKvmz noU4kBD6oso5Q6vHtTiypq+FN015XKvR9wtqwdk9dRe0iQi27HlWpmVQ5cLUQ9xk0poe xepdugp7jX34E+BANKB99fJmpztOk/1IXzfHyuDpkuBfZeyvQe1ghdaItLKT5In/A41t FVDOF5kBBU9WX1XDO/EHjCj65ib6woPzwd8Kxp7G1JnxmNJ+77rRt0ophr+VNIty8BmV YaQiHyajgzd8Cw0Ol4jvoKUXKdsu3/g+lTk55uHkDBj3y4NbqswLVX2i4f8smIlEat8T JUew== 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 d26si125823edy.410.2020.07.20.07.00.08; Mon, 20 Jul 2020 07:00:31 -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 S1728471AbgGTN66 (ORCPT + 99 others); Mon, 20 Jul 2020 09:58:58 -0400 Received: from netrider.rowland.org ([192.131.102.5]:46519 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726095AbgGTN66 (ORCPT ); Mon, 20 Jul 2020 09:58:58 -0400 Received: (qmail 1229238 invoked by uid 1000); 20 Jul 2020 09:58:57 -0400 Date: Mon, 20 Jul 2020 09:58:57 -0400 From: Alan Stern To: Michal Hocko Cc: LKML , Greg KH , linux-usb@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: kworker/0:3+pm hogging CPU Message-ID: <20200720135857.GB1228057@rowland.harvard.edu> References: <20200720083956.GA4074@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200720083956.GA4074@dhcp22.suse.cz> 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 Mon, Jul 20, 2020 at 10:39:56AM +0200, Michal Hocko wrote: > Hi, > I am not sure when this started happening but at least 5.6, 5.7 and > 5.8-rc6 all exhibit this problem. Please note that the this is happining > on a laptop which is not completely healthy. The BIOS complains that the > Battery cannot be charged because the power supply cannot be recognized. > This is somehting I have for a longer time without noticing the > kworker/0:3+pm problem so I do not think they are related but who knows. > > Anyway, kworker/0:3+pm is hogging CPU. /proc//0:3+pm is very often > empty so I suspect it just schedules very often and performs only small > amount of work. Here are few backtraces I've managed to catch > > [<0>] preempt_schedule_thunk+0x16/0x18 > [<0>] usb_hcd_submit_urb+0x686/0x773 > [<0>] usb_start_wait_urb+0x59/0xc8 > [<0>] usb_control_msg+0xd4/0x10d > [<0>] get_port_status+0x51/0x6f > [<0>] hub_port_status+0x41/0xa3 > [<0>] hub_activate+0x230/0x4ee > [<0>] hub_resume+0x20/0x9a > [<0>] usb_resume_interface.isra.0+0xb0/0xd0 > [<0>] usb_suspend_both+0xf6/0x20c > [<0>] usb_runtime_suspend+0x32/0x62 > [<0>] __rpm_callback+0x70/0xd4 > [<0>] rpm_callback+0x55/0x6b > [<0>] rpm_suspend+0x2af/0x440 > [<0>] __pm_runtime_suspend+0x48/0x62 > [<0>] usb_runtime_idle+0x26/0x2d > [<0>] __rpm_callback+0x70/0xd4 > [<0>] rpm_idle+0x179/0x1df > [<0>] pm_runtime_work+0x6b/0x81 > [<0>] process_one_work+0x1bd/0x2c6 > [<0>] worker_thread+0x19c/0x240 > [<0>] kthread+0x11b/0x123 > [<0>] ret_from_fork+0x22/0x30 > > [<0>] slab_pre_alloc_hook+0x15/0x46 > [<0>] __kmalloc+0x148/0x15a > [<0>] usb_hcd_submit_urb+0x5c6/0x773 > [<0>] usb_start_wait_urb+0x59/0xc8 > [<0>] usb_control_msg+0xd4/0x10d > [<0>] get_port_status+0x51/0x6f > [<0>] hub_port_status+0x41/0xa3 > [<0>] hub_activate+0x230/0x4ee > [<0>] hub_resume+0x20/0x9a > [<0>] usb_resume_interface.isra.0+0xb0/0xd0 > [<0>] usb_suspend_both+0xf6/0x20c > > [<0>] slab_pre_alloc_hook+0x15/0x46 > [<0>] __kmalloc+0x148/0x15a > [<0>] usb_hcd_submit_urb+0x5c6/0x773 > [<0>] usb_start_wait_urb+0x59/0xc8 > [<0>] usb_control_msg+0xd4/0x10d > [<0>] set_port_feature+0x33/0x38 > [<0>] hub_suspend+0x15c/0x16a > [<0>] usb_suspend_both+0x91/0x20c > [<0>] usb_runtime_suspend+0x32/0x62 > [<0>] __rpm_callback+0x70/0xd4 > [<0>] rpm_callback+0x55/0x6b > [<0>] rpm_suspend+0x2af/0x440 > [<0>] __pm_runtime_suspend+0x48/0x62 > [<0>] usb_runtime_idle+0x26/0x2d > [<0>] __rpm_callback+0x70/0xd4 > [<0>] rpm_idle+0x179/0x1df > [<0>] pm_runtime_work+0x6b/0x81 > [<0>] process_one_work+0x1bd/0x2c6 > [<0>] worker_thread+0x19c/0x240 > [<0>] kthread+0x11b/0x123 > [<0>] ret_from_fork+0x22/0x30 > > Is this something known or something I can give more information about? > From a very quick look into the code it sounds as if the system wanted > to suspend an USB device/controller but that keeps failing again and > again. Yes, that's what it looks like to me too. Or maybe the suspend succeeds but then the device/controller immediately gets woken up again. Can you provide the contents of /sys/kernel/debug/usb/devices and also a usbmon trace showing a few rounds of this recurring activity? Perhaps a section of the dmesg log with dynamic debugging enabled for the usbcore module, as well. Alan Stern