Received: by 10.223.185.116 with SMTP id b49csp2269545wrg; Thu, 22 Feb 2018 10:51:00 -0800 (PST) X-Google-Smtp-Source: AH8x226TkhH33JYkuRNZXvLf4z9UyWmFizrn9dts26EelTl6Y0I9atoqbRS7mR7nyN/K6/zmL6cM X-Received: by 2002:a17:902:ab8a:: with SMTP id f10-v6mr7587449plr.318.1519325459953; Thu, 22 Feb 2018 10:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519325459; cv=none; d=google.com; s=arc-20160816; b=YAQYCU2Tlx9PJpYiCgHx2XLuIoyvl+8/pmpEjxNRyHHCRHPtIUKEBsLZVxS4dQ/uNM 1suXOuscS6AuHy6udWzdOSwtnXz7qQjj9L2mjSAJpoingz3Hq5usb5s4E1ZIpHqwoqT4 3ACAxGhv9SYTOuX4t0MTHVSx1DWJPpRxrlv+bjr7bIIQkdn6gDJ8CFOjqZFTBINOeMyx rOBSv33/D/LqU776Lah5et3ZGjljMj9DMYzELbGFGyLCW/jeUenwzYodXHY1sUpB1Ed5 qgBtgpagWELl2QAhQ4CRe9wyIBjV40zrpyI5mvymdkkilFERsmXZGDo78PBn85rUq6E/ j9lg== 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=ToS2W5d6RlV9uPbGeBOxRPKpZVV2Dc6xDFgvofIQ9M8=; b=XNRj7n/4+FBbrMsayU4OLFbjPd7F4nSAQGQ+XJnHrVfRm8DuXDKzeY3e2h7Uu1gTEV u92JzCYB+n+uSzpxZTqSyxh+Sr57xh4Wi+KYnL0l4gAmsBVszf7bgRWYr7JUVha0m+63 ZYtVxEtnFIlPgz8rb4bh+JpjK3wKMC2SxjyI9r5wPJ/rJ25WvY790QTdck/2GyN327N7 gHYg8x6PKxp8whhCYxa0rdnnz775Ds3xTqHY8Mv53uaOFpDvMYJUOP5nvwqSYsSZbS7S +hUwTWjT4kwUdPJHiW8sOsvD07TL8FadAgjElM9Cq5cfVCfrAr03O6s8XYrCqNEsjLU9 FeLQ== 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 z23-v6si454262pll.4.2018.02.22.10.50.45; Thu, 22 Feb 2018 10:50:59 -0800 (PST) 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 S1751376AbeBVSpM (ORCPT + 99 others); Thu, 22 Feb 2018 13:45:12 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:48436 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750764AbeBVSpL (ORCPT ); Thu, 22 Feb 2018 13:45:11 -0500 Received: (qmail 2895 invoked by uid 2102); 22 Feb 2018 13:45:09 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Feb 2018 13:45:09 -0500 Date: Thu, 22 Feb 2018 13:45:09 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Sebastian Andrzej Siewior cc: Mauro Carvalho Chehab , Frederic Weisbecker , LKML , Peter Zijlstra , Thomas Gleixner , Subject: Re: [RFC PATCH] usb: hcd: complete URBs in threaded-IRQ context instead of tasklet In-Reply-To: <20180222161949.3prjzbvkss4hjj2c@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 Thu, 22 Feb 2018, Sebastian Andrzej Siewior wrote: > On 2018-02-16 16:46:41 [-0500], Alan Stern wrote: > > > The theaded interrupt runs SCHED_FIFO priority 50 by default. The only > > > thing that can interrupt it are interrupts, a softirq (not ksoftirqd) > > > and other tasks with a higher priority than 50. > > > There should be no downside performance wise. > > > > Maybe. It would be nice to see some real measurements. > > I had an usb3 flash stick behind the EHCI controller which was passed > through from the host to a kvm guest. The performance numbers in the > guest were equal (some noise was there) with and without the patch. > The numbers with the patch were worse if lockdep was enabled which isn't > much of a surprise. > If you have anything specific requirements for a measurement then please > let me know and I see what I can do. No, I didn't have anything more specific in mind. In principle then, using threaded-interrupt bottom halves instead of tasklets should be fine. I don't object to making such a change. However, using a work queue for root-hub URBs is pretty ugly. It would be better to reinstate the code that dropped hcd_root_hub_lock around root-hub givebacks, which was removed by commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context"); then it would be safe to give back those URBs in the bottom half. Alan Stern