Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1260830ybh; Mon, 13 Jul 2020 13:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUaHwAw3SiWueTTpTnf+Q414mYoO+I9otM0m5khyuXNZQdsPFhxVguYk9ZQ/8UnZD9UsFX X-Received: by 2002:a17:906:c78f:: with SMTP id cw15mr1502757ejb.58.1594673154320; Mon, 13 Jul 2020 13:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594673154; cv=none; d=google.com; s=arc-20160816; b=wCg+n5fVwwxCUI8+Gd7NEQ17CPGyu5ZKJORlGek7CU5Ad4Y75iPa7WGROjjhZzs9d0 M7Nw8tWEKau6xTiraOAiqqx9sjC4dGKV1E2MyBEZkCJVEQvPWisTJRTGIAAA3MklMfjO bFDigeWH0oJXcHvwCkAysqii+b6S+Zru1rtXzv7J6ZUv5uQZSVYRuBspCHQ7BPNlkNVK RrZ4Iwnn+Wb7nUUCy8GJDdrFLTzmrgxeYXawz0AI+GtkNviRZMugts9LNlvkAMhWVIk/ gbYPcCTD8TB544YD7N7P0x6KY1jdWleXgX0IUtCJSyF5YEuZHu7gh0wT6R5fgx2icVgZ /ewg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:from :subject:mime-version:message-id:date:dkim-signature; bh=u4BPyWh5yHs2Kab6PgpImYecSjjyYcaQmgcBiUoACx4=; b=QkhhZwQ/K8GzKT+cO3BzHj7mh1Qz9l25Ubpbvazse5sCq+QVjZSoD8rXXWWhTQdKUr G0Vd7/NqA/EQb1XO7q0Rt5XeGekm/iYVBnzIRyxeiQipKuVEOg8Bjs7CFynHKp2+mfFZ HKqfJVTB62ccbuVAeN6uNbYiU55e1nbkdp1eRwUjd1Bz/E5fUwcXz0vI5S3bltXnLc3P kDyErCfkr4nFsgdWefH7X64c4MSS67dZHRdOzsnmLhOW9fUy1KD8fkUvWNuFFS2DE4c6 lSpkN2TDR9ZvX8YPdvm3rXNPwgytzz/T9X5rtzLHt4iH2xEF8Ej/nnv0ypVdU3D7/OqE WgoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mS3cZkkL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw24si9055627edb.177.2020.07.13.13.45.29; Mon, 13 Jul 2020 13:45:54 -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=@google.com header.s=20161025 header.b=mS3cZkkL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgGMUnG (ORCPT + 99 others); Mon, 13 Jul 2020 16:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgGMUnG (ORCPT ); Mon, 13 Jul 2020 16:43:06 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE295C061755 for ; Mon, 13 Jul 2020 13:43:05 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id i62so17094949ybc.15 for ; Mon, 13 Jul 2020 13:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc :content-transfer-encoding; bh=u4BPyWh5yHs2Kab6PgpImYecSjjyYcaQmgcBiUoACx4=; b=mS3cZkkL4ytB2Rv9TXb6i3g2Jr9fxMLvGOFLgmKO9mjkEr2Y/YJXB0wtQJLK+1GUOk nu95u4fibL1kpfO/8a2bC1HCfJzeJp0nIGY9Y/mE7n8753iaBgxcgy6Sb77+8E+wOiXT kQw87UJdQEJlo2BV8MJb+FknKPXT2a6vUbZEFT0Lt5IXOX2gPrrkYCf93BhKjdM5bPtX FM4KoYL67nCmJccP4NUqatEwEDkkHIDJS2/U6Xup2+IyYS0WEtM+zmCqpW19mGTKAXiS Nw/l/lUA84twskulRUy5b0xMobsP53aJ+/mb537ln0Mk4IKTtxC7EAxxJLNUo749fkwv 3f1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc :content-transfer-encoding; bh=u4BPyWh5yHs2Kab6PgpImYecSjjyYcaQmgcBiUoACx4=; b=pSvaVphQ7fkxv5L3OqynfEXZZ3q23eQ6hViuqVifuogsQyuZcI/B8DphnYmOzsm6HC qyuCTCECD1kBJMrQFm+DnzEmIYHYBoOpEcVBjLMvRbiwmLeskzQFInfAOUammH3jjNjB /SJWXUHkMDUYl7YzurUJUmBEeGp76buSHb+lbxNklDGSihqjWzhzwRmJlXKdv5+AgGA+ T1iVUByXaB053bfFirJIzby+EAk9EngJGySu1GA4r+2E/OOutSNAiSwCkGkVsbWQuvFR GHn1pgKvhWvOUx/TlY3grySbGjP3i4lpqpN/ES87UTli34/OQlNhCmgMgSNIaVbOJjeR 97wQ== X-Gm-Message-State: AOAM532UCQo876AZ/hIJ6Rthjlye680wK8RtaP29ijZQiBq2CH0fsI0x GBnL4Hnqftd3nt2zgyORSCgZPQxE9cw= X-Received: by 2002:a25:d80b:: with SMTP id p11mr2915414ybg.506.1594672984919; Mon, 13 Jul 2020 13:43:04 -0700 (PDT) Date: Mon, 13 Jul 2020 13:43:00 -0700 Message-Id: <20200713204300.345975-1-badhri@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.27.0.383.g050319c2ae-goog Subject: [PATCH] usb: typec: tcpm: Move to high priority workqueue for processing events From: Badhri Jagan Sridharan To: Guenter Roeck , Heikki Krogerus , reg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Badhri Jagan Sridharan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "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=E2=80=99s 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 *d= ev, struct tcpc_dev *tcpc) mutex_init(&port->lock); mutex_init(&port->swap_lock); =20 - port->wq =3D create_singlethread_workqueue(dev_name(dev)); + port->wq =3D alloc_ordered_workqueue("%s", WQ_HIGHPRI, dev_name(dev)); if (!port->wq) return ERR_PTR(-ENOMEM); INIT_DELAYED_WORK(&port->state_machine, tcpm_state_machine_work); --=20 2.27.0.383.g050319c2ae-goog