Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1516507ybh; Mon, 13 Jul 2020 23:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLqZaMPkwCv8+bKQTn0U3fgVXcm8BctX6YtABC67nfWVHLhUMAwV6VLpXCvpbyQv5GplRS X-Received: by 2002:a17:906:6d49:: with SMTP id a9mr2912732ejt.435.1594706797781; Mon, 13 Jul 2020 23:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594706797; cv=none; d=google.com; s=arc-20160816; b=CNawizp8tMh/LChJ7QuXFlNlInZxYPIJxc+3WCJnT3JMnM3QZNy5wsoHYSUOLm3vtO EsMwuebYzWWKDXGUjiqUYpWw+iYtVS6C5Qw390N4MDj2GVuBiuyyfyvRWDAr2GQgp2tu sE36354Jg2cJpVO2+RBI3qOKTAFCCCee1ITUGIsJipfamF5H8pmXu2KQ/Yx7wN1bMxJe dLMEasCQdybMTIlZEPumfwl25ILlNvC+17FcURGc7ZevNRxta46X4fke8juhrG1JRlJ1 ENGKVjnnX7ahb+3YKvSwE4JnJSrimjF9ZF5rN748ta8DpftpD0eV5VYQGX2/opFXaDzR uL3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uiYYPJK56Jj0IdazLgHYxK7ah38FUlwnHievKV4NiMo=; b=ymcs+oV3HT9VHGv/hYnjmMJPkGhkXVtop5leuksIbtGLIpiq4JCapNkW6BLf+Sz1+D 4ohudv+3tqPg6oG7oT3T0G5Cc/QvbA7JY6WSpfnv7xnHj+t5NrJNOX3q+zLnW/7siFn3 8iayxkTczWqz5m/RL7S+0NvOXX8AeVa7KPIOn0S/Mqpulqjy4t7cnQFA08wsVMsmIH6s JCILoLSbn/21UA+hhF9iHXmrcci24kcmeOYHJJU83eya6pTMleBlougtQdvKIkrXc97F NYORu2kAuNKIaQlVHVCdK/gLqjuNSFnavXASlU4YrxTMa7PtyqxEq0WvDYQOh3bq6fdt VVAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="jm/Djc8v"; 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 w6si10407696edx.62.2020.07.13.23.06.15; Mon, 13 Jul 2020 23:06:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b="jm/Djc8v"; 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 S1726624AbgGNGFX (ORCPT + 99 others); Tue, 14 Jul 2020 02:05:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:52644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgGNGFW (ORCPT ); Tue, 14 Jul 2020 02:05:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 597C520890; Tue, 14 Jul 2020 06:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594706721; bh=bHbsEQUe++Lcee6QxGMLVV8KWlmKwrS5KtkVW9rfyeU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jm/Djc8vK56LTCq+jDsDw1QyMassDPWu10If0CuiGPm0/PC8lzLTMMbPDOFNnpA8l xoxzZnzJxfUTfZ3ADn9XomKui/y9YscOQSFMsbHd99EVRT5Hre1d3T6iQznH7bANQQ cZFO10EHHHvWRF/nqHybpFMZv240jmXo/r3Uex14= Date: Tue, 14 Jul 2020 08:05:20 +0200 From: reg Kroah-Hartman To: Badhri Jagan Sridharan Cc: Guenter Roeck , Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: tcpm: Move to high priority workqueue for processing events Message-ID: <20200714060520.GB657428@kroah.com> References: <20200713204300.345975-1-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200713204300.345975-1-badhri@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 01:43:00PM -0700, Badhri Jagan Sridharan wrote: > "tReceiverResponse 15 ms Section 6.6.2 > The receiver of a Message requiring a response Shall respond > within tReceiverResponse in order to ensure that the > sender’s SenderResponseTimer does not expire." > > When the cpu complex is busy running other lower priority > work items, TCPM's work queue sometimes does not get scheduled > on time to meet the above requirement from the spec. > Elevating the TCPM's work queue to higher priority allows > TCPM to meet tReceiverResponse in a busy system. > > Signed-off-by: Badhri Jagan Sridharan > --- > drivers/usb/typec/tcpm/tcpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 82b19ebd7838e0..088b6f1fa1ff89 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -4747,7 +4747,7 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc) > mutex_init(&port->lock); > mutex_init(&port->swap_lock); > > - port->wq = create_singlethread_workqueue(dev_name(dev)); > + port->wq = alloc_ordered_workqueue("%s", WQ_HIGHPRI, dev_name(dev)); How are you "guaranteeing" that this is really going to change anything on a highly loaded machine? Yes, it might make things better, but if you have a hard deadline like this, you need to do things a bit differently to always ensure that you meet it. I do not think this change is that fix, do you? thanks, greg k-h