Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1266977imm; Fri, 15 Jun 2018 14:05:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFnZYmZWPTHfoetbK+VeY3Hi8A2IsBP2iCz3hv5za+fhh1aVjFAEzusFhK32SqqJI0neqo X-Received: by 2002:a63:951c:: with SMTP id p28-v6mr3035716pgd.318.1529096753565; Fri, 15 Jun 2018 14:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529096753; cv=none; d=google.com; s=arc-20160816; b=hsaf3/jrkpEEV/8P5j04MErglEjt520UL52UblNh18DzPrQKKaPysUm2JIUQxnjL/4 B8GwIBH7vTmTbHWDbhTtAx1WNNaadlkdUx38cXdNU6wX3w2HKcv37xKw6fjbvL7w21la Sv0lbs7u9qDK3dW9tto6ua+Yi2eSzTy7sjMsbDfqcbUHJvGsYvdTq0yIAkwRg3Tzxc89 qxLiTXa/rufodW82JcuEhAZW/tgAtGLoOHC9p6ZXmgr2tEK9rMyAhM3miq7jt3L9phIB GWujI1K1L+73Z1q3kioIs+KZApWhsGC04GzD3i9rpJJSYKs8AhWHt/JUYaEyEWSnFFEJ hCsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=904QRlMF8mKHRguv3g4p2AQqutcILvizVbw/lnrCo4s=; b=uaCMHdcK6XKy2WDacCzoER6TYK9wwndbhuDWo3KMb0wh9yDETuKgTLfDi97bxONrG6 Xxsh1YCCBxXhvbStLo5QsJQ/siLdvK/EQTRystOfA3avtQpE1cTtk76mWRXkLKzEXZvE QOf5I2sT18Gn1RdGWhhTiXmCU9W7ixAQOpjkbwKdB1402uvwr5j1Jh3mJJTe3tywvIHy yiFBZ2Nh/puNXrlNPVT2PKtPBeWUpprAqJDSBIPw31xXWeDdH/D28wbhnvl0rYMmDkDj lCm70jyxJjVe5aZknC9htZPcTUwGo9mn4dLMxDLTw/dk025OPyztNXmB67ibMRdgcdJP emww== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q62-v6si7348872pga.217.2018.06.15.14.05.39; Fri, 15 Jun 2018 14:05:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756562AbeFOVFG (ORCPT + 99 others); Fri, 15 Jun 2018 17:05:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59340 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754429AbeFOVFE (ORCPT ); Fri, 15 Jun 2018 17:05:04 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 263704070481; Fri, 15 Jun 2018 21:05:04 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B5BB5032D; Fri, 15 Jun 2018 21:05:01 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w5FL513d026715; Fri, 15 Jun 2018 17:05:01 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w5FL51P9026711; Fri, 15 Jun 2018 17:05:01 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 15 Jun 2018 17:05:01 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Thomas Gleixner cc: Alan Stern , Steven Rostedt , Ming Lei , Greg Kroah-Hartman , USB list , Kernel development list , Sebastian Sewior Subject: Re: High-priority softirqs [was: [PATCH] usb: don't offload isochronous urb completions to ksoftirq] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 15 Jun 2018 21:05:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 15 Jun 2018 21:05:04 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jun 2018, 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. > > Thanks, > > tglx I don't think that threaded interrupt handlers are a good idea. There are existing tools such as rtkit in Linux distributions that increase the priority of audio applications to real time. And if rtkit increases the priority of audio player or audio server above the priority of the interrupt thread that handles the soundcard - sound playback is screwed. You would have to set the priority of the interrupt thread to the highest real-time priority - and in such a case, the interrupt thread is no different than a hard-irq handler. Mikulas