Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1255956imm; Fri, 15 Jun 2018 13:55:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKfx5QLlPgJWXaglHXPsuPQEIRzv5fYVKuqhiLx4huVq3g4kwKdnsm4WQfEDZOXfQkTf1OY X-Received: by 2002:a65:63cb:: with SMTP id n11-v6mr2965169pgv.185.1529096134024; Fri, 15 Jun 2018 13:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529096133; cv=none; d=google.com; s=arc-20160816; b=B4g/zk+XuJa3y0FFwKCkMNR53lOXYAWEZ9JbmXsavb+J1zHH1uB3cbKkTY15fTaSU5 e9FOnZiF5y8v2Q9yY4KGXFTM5pI2BStZWycHTbthjta35U5qaoFP63hm+DcUJKP1oQG5 BmDhH6qwPjah4efXhSQZpXim9OjRVQC4HhrXF4n+uus11nQoyk4gtzdcaqu5DV1EfEeb tF0tInQX1BVG0VHfruRqYb+xoClk0eLiXYpjuULT+5gdZA44JHUIY6AMlWL1GDYULrJp Ov5kwm0vHXknB+GOLip5w5j3AAH92wWgv/Qe/y37a6qvOjUA/H/sICYSzKp0LkAqSNrG JwOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=PvcHOTPNxgscFYg9g1qSlpSMK3I0Ac+5ewbG/1iQwnk=; b=ZZbsawIThxa12GFmKElxGaVAOyBXVL24YEH56Y6Sv4O0dPYGUaYNX7/1PLQtn1+6WY ON0Mj1ty7NgKfQ3C0dFj5dMZ4Xl7rKkRInna01X6OOcP2TvhI+c51RA8vs4lo2jV8O/r EQ60n4JfwNr5WU5FW0m722muPBiHnteA8GE4lThVmYnr130s524n44s2vELio+AUgMMz R0UQnVQOKOFF1IYKDSVIUQyTwrwQC216+IXpzvYuzCjkc390ij5SzutPeSl5lgWN6DlY b8a1QVWTWXkprdu4nqXhyKmq28MrXOVA7KNiNem+sp6r0BrNVf2WKIzJ39d6ebte4YyQ vuYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c125-v6si6695766pga.413.2018.06.15.13.55.19; Fri, 15 Jun 2018 13:55:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756455AbeFOUyQ (ORCPT + 99 others); Fri, 15 Jun 2018 16:54:16 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:47224 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753541AbeFOUyP (ORCPT ); Fri, 15 Jun 2018 16:54:15 -0400 Received: (qmail 5510 invoked by uid 2102); 15 Jun 2018 16:54:14 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 15 Jun 2018 16:54:14 -0400 Date: Fri, 15 Jun 2018 16:54:14 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Sebastian Sewior cc: Steven Rostedt , Thomas Gleixner , Mikulas Patocka , Ming Lei , Greg Kroah-Hartman , USB list , Kernel development list Subject: Re: High-priority softirqs [was: [PATCH] usb: don't offload isochronous urb completions to ksoftirq] In-Reply-To: <20180615174012.m6rqow2sytwgxxrx@linutronix.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jun 2018, Sebastian Sewior wrote: > On 2018-06-15 13:34:28 [-0400], Steven Rostedt wrote: > > On Fri, 15 Jun 2018 19:28:34 +0200 (CEST) > > Thomas Gleixner wrote: > > > > > One solution to that is to avoid both tasklets and kworkers and change the > > > USB code to make use of threaded interrupt handlers. I.e. handle the fast > > > stuff in the primary (hardirq) handler and delegate the rest to the irq > > > thread. That thread still can offload disk type stuff to a kworker if > > > needed. But the irq thread allows to bring the stuff under scheduler > > > control and experiments which I did a few years ago worked out pretty good. > > > > If there's any question about this, drivers can request to have their > > interrupt handlers run as threads. This has been added to mainline > > years ago. And it really should be the default solution before pushing > > off to tasklets or kworkers. > > https://lkml.kernel.org/r/20180216170450.yl5owfphuvltstnt@breakpoint.cc This is more or less independent of our original question. Even if we migrate the USB stack to use threaded interrupt handlers instead of tasklets, we still have to face the issue of completing some isochronous URBs at high priority and others not in interrupt context (presumably at normal priority). The URB_FAST_COMPLETION approach seems like the best solution to the audio problem. And if we do switch over to threaded interrupts for URB completions in the future, it should still be compatible. Alan Stern