Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1622485ybg; Wed, 29 Jul 2020 20:42:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy454YI7NfLxzJOtnrh4h930y61ylRmkdQT/6UL8Oy87gDMYSLwrI/4olHeAkOG1hLqeUK X-Received: by 2002:a17:907:94c9:: with SMTP id dn9mr642105ejc.355.1596080540787; Wed, 29 Jul 2020 20:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596080540; cv=none; d=google.com; s=arc-20160816; b=WN/Jz2dB5WwG3bkizYHcWxheNuK1HEPLjS2YsV7D77DauYlkoDm1D4DkwV2h41UKy+ nflRE06pLMu0D8NuVqadyEAuM0mbKKUVzyIH7xqXNWUZKpAJMc+fL4L6R+qPf6SIRzdW hvRw1mkVgHU+ND60V5i5sf1ONcZl9LiqNfdVbrKChyApJoZ+F6Hs6zy1oD1elThsuLMM TwjUXnXyhJTA8eMkLNzAKkAsE+5Y+pnz4wPpMUKVoNQ8Moa484ZfEUN3cTb1TFu1dFtH mn+o1kk8UybQ/6+qvpQcitihHDNEYrhSAKCatCoLVSjluyfzKXoHi62AJhgWVmwF8t/V VBIQ== 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:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z1sAyLTDEjPM6zyaHgMGx2Wjb/mXRdUmNjDBN1uT0q4=; b=xCEnAg8GmxAAfBsEwySEGik8qO5Q5jiBdZyqlSA9zF2WazZiUPVk9aBE42pGE3EWrc 7BTmwAbm1IRatTq+/LvI7oDCz00gA+XTu33tMA0dqrm3JdYevIyHklzyc8r6Cmo24dl2 cGasnG8e1swqOTUOdIPwz4+IZG2s0Kea82dnnirUXOrOREJwzt3asSr0+IGLkue7/PeQ pZKe2bNpD03LnFPs7q+Wt/FIPSRjbhC51XN5EgXTZa79PiDEZfzeX4T5fatb83U3UEo2 TBIGZRzZedciFjaIgrwJdKhiM0c4bozIDwIWUXVtLOFsyLrF7Laubv7h6kXeWSCVMDgI dZfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gJwzjMhs; 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 si6si2883254ejb.331.2020.07.29.20.41.58; Wed, 29 Jul 2020 20:42:20 -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=gJwzjMhs; 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 S1728532AbgG3DiX (ORCPT + 99 others); Wed, 29 Jul 2020 23:38:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728470AbgG3DiW (ORCPT ); Wed, 29 Jul 2020 23:38:22 -0400 Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99EBFC0619D2 for ; Wed, 29 Jul 2020 20:38:21 -0700 (PDT) Received: by mail-vk1-xa44.google.com with SMTP id s81so861664vkb.3 for ; Wed, 29 Jul 2020 20:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=z1sAyLTDEjPM6zyaHgMGx2Wjb/mXRdUmNjDBN1uT0q4=; b=gJwzjMhsyl7z5qQHIT4ATU64NfDhGWH8Yy6QsBH4feSwQGonlDnIyhBffRnVCxPjYm XOyvlqZL0vWEMZL7Ub0+z5NsBy/qkBQfF6mXo7fRQTmLiG3fXgNUcgIy4GqYCcwfkrXi V2uQyR3LekHvhKFdXbSjcwn8wNPHdJCTvTxVAlcfczACk2/QaiqqBwjzeuKOeXwNpilW +QuiN8Fa5WS7KjQdgOAEyDsY2XoYtdnZwM5mZixDuU+TJO8BJh3aqpD+lbbPP/JoQR49 rqgW3ekcHn6gEZozVfm9i1Fhrt3tpxDCVhilO5oNDRcMSx4snhTkM38Ch6EBwYtL3aOa 4ZUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=z1sAyLTDEjPM6zyaHgMGx2Wjb/mXRdUmNjDBN1uT0q4=; b=GK/9I4/qCidxSVf8fE//olEEPxZmXNC/yyBFTcv2GW9pGiI8jUlABBsfnNja1J/ENU nRsTm4Oflx8IeG48eFIK5HSFtt7d+HhJVc/8aeotCksvd5GozcYZIKA7zqWHq1ilUkqW 3VHuWk0m0CTLsMoygaIYV91HvnRerF3z0HWblURub1PfCQ0HtqUmKdmx6k/wChVBZTv/ RNCPZiVHvkyG+g40IrG5UhjDb6TzfK5ouX5n7NzbGyc5avKRpefKXWTUjzLSXuEgYkS4 yVhsBl42VE6Xkaf/RlLXhR4scCYwvySjPXzNJnqxcO7lNoC49J1ZFWR/Pv08QuOrfKkh EMbQ== X-Gm-Message-State: AOAM533bT23GLVCXIad5TEdvlTI8HPTq+D+7X39uP0r3n3rBIWiGAG8E SmeygKEp3tMKHmEF0tIXGyk70aFwS5BGb1GThmhIFg== X-Received: by 2002:a1f:2688:: with SMTP id m130mr556541vkm.48.1596080300428; Wed, 29 Jul 2020 20:38:20 -0700 (PDT) MIME-Version: 1.0 References: <20200724020551.2737376-1-badhri@google.com> <20200729145309.GA3490882@kroah.com> In-Reply-To: From: Badhri Jagan Sridharan Date: Wed, 29 Jul 2020 20:37:44 -0700 Message-ID: Subject: Re: [PATCH v2] usb: typec: tcpm: Migrate workqueue to RT priority for processing events To: Guenter Roeck , hdegoede@redhat.com Cc: Greg Kroah-Hartman , Heikki Krogerus , USB , LKML 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 Hi Guenter, I see that Hans is saying that he has submitted some patch here. https://lore.kernel.org/lkml/65f27abc-69c8-3877-be5b-e5e478153af9@redhat.co= m/ But, haven't found the actual patches yet ! Thanks, Badhri On Wed, Jul 29, 2020 at 8:03 PM Guenter Roeck wrote: > > On 7/29/20 7:28 PM, Badhri Jagan Sridharan wrote: > > Hi Greg, > > > > Sure just sent the new patch v3. > > > > Patch applies cleanly on my end. So wondering what I am missing. > > I expected your patch to conflict with Hans' patch series. > Maybe those are in a different tree/branch ? > > Guenter > > > Just in case if you are still noticing merge conflicts. > > > > Here is the git log of my local tree: > > 633198cd2945b7 (HEAD -> usb-next-1) usb: typec: tcpm: Migrate workqueue= to RT priority for processing events > > fa56dd9152ef95 (origin/usb-next) Merge tag 'usb-serial-5.9-rc1' of http= s://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next > > 25252919a1050e xhci: dbgtty: Make some functions static > > b0e02550346e67 xhci: dbc: Make function xhci_dbc_ring_alloc() static > > ca6377900974c3 Revert "usb: dwc2: override PHY input signals with usb r= ole switch support" > > 09df709cb5aeb2 Revert "usb: dwc2: don't use ID/Vbus detection if usb-ro= le-switch on STM32MP15 SoCs" > > 17a82716587e9d USB: iowarrior: fix up report size handling for some dev= ices > > e98ba8cc3f8a89 Merge tag 'usb-for-v5.9' of git://git.kernel.org/pub/scm= /linux/kernel/git/balbi/usb into usb-next > > c97793089b11f7 Merge 5.8-rc7 into usb-next > > 92ed301919932f (tag: v5.8-rc7, origin/usb-linus, origin/main) Linux 5.8= -rc7 > > > > Was comparing against https://git.kernel.org/pub/scm/linux/kernel/git/g= regkh/usb.git/log/?h=3Dusb-next > > > > Thanks, > > Badhri > > > > On Wed, Jul 29, 2020 at 7:53 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jul 23, 2020 at 07:05:51PM -0700, Badhri Jagan Sridharan wr= ote: > > > "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. > > > Moving to kthread_work apis to run with real time priority. > > > Just lower than the default threaded irq priority, > > > MAX_USER_RT_PRIO/2 + 1. (Higher number implies lower priority). > > > > > > Further, as observed in 1ff688209e2e, moving to hrtimers to > > > overcome scheduling latency while scheduling the delayed work. > > > > > > TCPM has three work streams: > > > 1. tcpm_state_machine > > > 2. vdm_state_machine > > > 3. event_work > > > > > > tcpm_state_machine and vdm_state_machine both schedule work in > > > future i.e. delayed. Hence each of them have a corresponding > > > hrtimer, tcpm_state_machine_timer & vdm_state_machine_timer. > > > > > > When work is queued right away kthread_queue_work is used. > > > Else, the relevant timer is programmed and made to queue > > > the kthread_work upon timer expiry. > > > > > > kthread_create_worker only creates one kthread worker thread, > > > hence single threadedness of workqueue is retained. > > > > > > Signed-off-by: Badhri Jagan Sridharan > > > > > This doesn't apply against my usb-next branch at all. > > > > Can you rebase and resend? > > > > Remember to collect the reviewed-by tags as well when you do so. > > > > thanks, > > > > greg k-h > > >