Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2963108pxb; Tue, 13 Apr 2021 14:57:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy20vy82BiD7ylVYmaaJ2Jv47HHO5Sga8gGWsmffPcU9vTqk2dGPxJQs7ux7i1PT4xr5E2Q X-Received: by 2002:a05:6402:27d3:: with SMTP id c19mr37902112ede.129.1618351032518; Tue, 13 Apr 2021 14:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618351032; cv=none; d=google.com; s=arc-20160816; b=UfP/MDxyruLdg4G9gZd2L5zGl5OtVBK9yYoSVlyCgLrobIrqTDbnUwURvnbJKZ6BD5 E/N5fpjg5tV96LW+IJejLZC5aPwGIqs9hnC/a/1GMwmpdlmykPAMNXgaKdUfFZoOgmxf 46xlayggtzWU51w5/HxGJNXdODTl4hkyDEjpyPduICbM2I0Fd3iHSEP+mZD6dj8ef1ID mLjrlIJhqizzRI9OIVGOCWlHKoOX1/MuDq1IPAqO0K7cIRwBVRxd/4nPk0dCLTw58Qkw FVQgoaP/UVAiS2mHE6kFFzEzoS/YNlQJ7kE5uQLKvkQcGpbc8wRa8yrawJKfrjX230X8 eQtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=PLs2idnlCT+BrCssylkLjLCqQ64RiQvKHsO94aHXHoc=; b=a3JM0sLFHSUw/0EKhXLkhac82A/+haoj6UR19u7EvVFTe3nut7J5Rp4exjwEIItHcv +5j4kFH22bXIoUQxHvM9fJ52gP8XkXoNk/IndJH1k6vsiwBEKJut+8WPOlsOs95heTio elnqqtS+kDbTxfBYK65EEBtsgOMi8T/MD3O2ICS8Wd1zAbsdDCrkffScrQ/zAi/NZwkz 6Ci7jmjfWmoHbJdILYm4ecVAOs4BbX4kpPfMm57zMfG/G6VQOEdpYiPfqU+xTxQqsR2u +1ru+UUZjzb5KyI7OCqtTsTlluXdsF4HWeGcZZ2ulXR4IN1qgcv0BAdFVenM4PWY3qgP MbrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pbaLDr1V; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si7542050ejf.337.2021.04.13.14.56.49; Tue, 13 Apr 2021 14:57:12 -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=@gmail.com header.s=20161025 header.b=pbaLDr1V; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346938AbhDMQ4q (ORCPT + 99 others); Tue, 13 Apr 2021 12:56:46 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:44591 "EHLO mail-lf1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbhDMQ4k (ORCPT ); Tue, 13 Apr 2021 12:56:40 -0400 Received: by mail-lf1-f45.google.com with SMTP id e14so15688947lfn.11 for ; Tue, 13 Apr 2021 09:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=PLs2idnlCT+BrCssylkLjLCqQ64RiQvKHsO94aHXHoc=; b=pbaLDr1VC49hn80iw3eKa5iB3TYAaclZauvrXsDG3Q8GMv8J8yVIe9aeREoa34Nyc5 Gs1Lv5w0rssBHa7NMILEaPWgEGA6Av+mD1gu2VbOfYvp5/p7JE4O0hzolrndBiaZpcJg EDFsxWC/AdbU1qm+4Fw63KdUdsaaAa9oWnM4igzjVX4XdwVf+n5pHmzvn6OLqWIXZ64F gIUlFy4pslTzi8ubTOrcg/K8GFkzcvDo2wRtVnYfOpB2PYr99oYjHgOvlzs/2swSTCZQ tgmUPmMYu6HU8nBLz6Ynb8Q1/ZIPgVEdRJJMczccrY602L9jcvIivgSVhXz6HgPeCLOV tz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=PLs2idnlCT+BrCssylkLjLCqQ64RiQvKHsO94aHXHoc=; b=oohFaNmXd0tHYUUCKoZNe+LACUN6IXqTrJdS/6VlF3JoH9FMEFeftM0DqPKwD7YTom zfAqBJ2H05G9Zt874nl+MSRZ30UYpPvxOteFVzWvIeoXfOD09bCU69RB2T059HPCEjMy 9uKGzBoJPREJBwEtWpxRWwzHvfAPJTyhyLVuaWK2WTth4yLmaZb4yOZIhb9ailci6VfY ea/QA0fywcjuFeiZ626LASqUX5di+YVouABmqsIen5VhMsep0dyif20OhqS4PumoMuyE ky62b8Ir/J1wdB3JoJw1zEchbs2rZlqPw1H6uJ4t7MTiN+MBiJJGE0zrQNgjnfuO0hIq DsCg== X-Gm-Message-State: AOAM531YwaB4jzNvv2YD+47Z12w1xftDJgLoLvZdPM6gLvGtWkXi4UMH 3yYqvJpw+veFoGrx0AvKZieffYoRpyTqO/TRheU= X-Received: by 2002:a19:c218:: with SMTP id l24mr22775980lfc.524.1618332919909; Tue, 13 Apr 2021 09:55:19 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Maciej_=C5=BBenczykowski?= Date: Tue, 13 Apr 2021 09:55:08 -0700 Message-ID: Subject: Re: [PATCH] hrtimer: Update softirq_expires_next correctly after __hrtimer_get_next_event() To: Ingo Molnar , Greg KH , Anna-Maria Behnsen Cc: linux-kernel@vger.kernel.org, mikael.beckius@windriver.com, tglx@linutronix.de, Lorenzo Colitti , =?UTF-8?Q?Maciej_=C5=BBenczykowski?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch (or at least the version of it that showed up in 5.10.24 LTS when combined with Android Common Kernel and some arm phone platform drivers) causes a roughly 60% regression (from ~5.3-6 gbps down to ~2.2gbps) on running pktgen when egressing via ncm gadget on a SuperSpeed+ 10gbps USB3 connection. The regression is not there in 5.10.23, and is present in 5.10.24 and 5.10.26. Reverting just this one patch is confirmed to restore performance (both on 5.10.24 and 5.10.26). We don't know the cause, as we know nothing about hrtimers... but we lightly suspect that the ncm->task_timer in f_ncm.c is perhaps not firing as often as it should... Unfortunately I have no idea how to replicate this on commonly available hardware (or with a pure stable or 5.11/5.12 Linus tree) since it requires a gadget capable usb3.1 10gbps controller (which I only have access to in combination with a 5.10-based arm+dwc3 soc). (the regression is visible with just usb3.0, but it's smaller due to usb3.0 topping out at just under 4gbps, though it still drops to 2.2gbps -- and this still doesn't help since usb3 gadget capable controllers are nearly as rare) - Maciej & Lorenzo