From patchwork Mon May 13 10:29:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 164014 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1141151ili; Mon, 13 May 2019 03:30:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyolTxxfSGB/hufSSS62+HcBMUDNmOmi6so8KJD6b55CmTF9qYn1lgIcOaDZil4S86Kb0SY X-Received: by 2002:a17:902:6b44:: with SMTP id g4mr29396494plt.157.1557743407587; Mon, 13 May 2019 03:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557743407; cv=none; d=google.com; s=arc-20160816; b=B+dJZAltCVrilMBFrSZh2loZjowwbqSOAbKJVJ6cD7S2UYR6u2sRVKOSp1H0Uu8XCx Sox7y0H4YEQbdyht1+2cAqgYkWJk9ukyagXZ7H70PO1F+/zmzyUuBZO7d7QLYmmb8/iz DF1/sVrhsr9jlhAv1UTs7YSJ/scy01uooUd8cnLpsr6J0j6lccbPlKZC52oOPiFCecEF 9r1WyqIVnW9uGJnNBIvQNGrDRD7PMTSQBbdksbzNWiEt8rwY3gwiPRQadXMKXnvBIrc0 u9h/U+ZMNnSUP8fS0ty05P1a/LoxA3cImA+yIaRzt82005FlHtQt7tUoyx5+S2SQp5YV Oi8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=MHFzWqswHjXCmx9iDo70lNLJIGlzKp8n1GuO5jx4MsQ=; b=DsCcxrfFykd+BIr8J5GOyE0AADK7BMRXs0Rj7sgWa+oT1Az1vGGtYpyTy3yc/TmZNK R9zWNVI+VvxC3oa4v2g+88yi9uNk6p3Uas8y/ZAtkHLeOyfHPDsF+4gOMzjOh0nk42Mu x3dP+e3yafXoKmhGRHneeBuHypXbvFBc0RPj9Sw3iCACU53qjXnqqQZJaWkTebCAsF89 V2ZeE/dOvMnFzSMsh+3nru+yaLLhlnKF9Lh+ny546K1yjVlcDYMyh3xbj7VZa9ZGpx6R UUI+ayNBHjwaFaVM9GI+7HDj4HgtggXt64ImY88KK+5FqjmEVJPz2FupCSM/sdfekqCf v99Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S/aG573v"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b144si16885015pfb.184.2019.05.13.03.30.07; Mon, 13 May 2019 03:30:07 -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; dkim=pass header.i=@linaro.org header.s=google header.b="S/aG573v"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728521AbfEMKaG (ORCPT + 30 others); Mon, 13 May 2019 06:30:06 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54618 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbfEMKaF (ORCPT ); Mon, 13 May 2019 06:30:05 -0400 Received: by mail-wm1-f68.google.com with SMTP id i3so7467459wml.4 for ; Mon, 13 May 2019 03:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=MHFzWqswHjXCmx9iDo70lNLJIGlzKp8n1GuO5jx4MsQ=; b=S/aG573vDpGh576nyKOcsUPjoQG+N5NDt4CjHHz7eBJan46Kl1etoz4Ov/8/PnYAvP QQUeleHnmYEly28lCqdxXPgzXqG7JvxBER+O8ZeLMwMN0qZPKJTsvnFL2PR0TEYRzHfk BKxcvYW1fwvwoW+iRYJPNIbNpQzgG/2nMKgTMnCWg+TvcGSDNtCYrfzboWube3Vf5mla SqMzZYOawYKDPyjItt9OjGOiF7+FvHAYQVL/bXl5dqb5a7kI46x/FnXxgobpwSHa4EH7 /yGTslmVlmk+CFXoa1k+ikpArPMNAWAnvF+dRG29MEXNnaO6lkUTMkmJGR5ooPH2R79K ET9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MHFzWqswHjXCmx9iDo70lNLJIGlzKp8n1GuO5jx4MsQ=; b=GosCLa5BxCLHSdKctqqRnSsWLRBZaSSHNJ89Ym9POGgb5o08LSIC8TkwtvHv+kroo2 CFEz/FuEAva6gLGrIK2inj9e6TxOR6Z5EnaIhGHol36eU3Xn8x8GZP13gYZxNUsKuTyJ e0EvzZb+grqcaq4NN8i/LN7R3abpabB5nkPn4DDHOvYUwOxhvYT5OOQ0dZkm9MZ/SBe2 8YpxdX8FzcURZTAWyN7NtVgXmCi2UF1HwmdIxe9hHwsw1OSZIJFUi6Cy1KMYvOE/fJMo AZArxsPXb7Qp2mV8Sgn8LPk20RwhGSShEMCIYCYrjN3gkb6FNFy/uYDJ52qc3OBOIxCe 9gLw== X-Gm-Message-State: APjAAAWUxYkFm+3HZswgFJqyuEAHIzoAoC6O3Hdj92Jo11IYxvJMq8dS 90H3wTKWnOX2sJnhb1gq/atKy4pfV+w= X-Received: by 2002:a7b:c093:: with SMTP id r19mr9084380wmh.35.1557743403448; Mon, 13 May 2019 03:30:03 -0700 (PDT) Received: from clegane.local (205.29.129.77.rev.sfr.net. [77.129.29.205]) by smtp.gmail.com with ESMTPSA id v192sm13645238wme.24.2019.05.13.03.30.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 03:30:02 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org Subject: [PATCH 0/9] genirq/timings: Fixes and selftests Date: Mon, 13 May 2019 12:29:44 +0200 Message-Id: <20190513102953.16424-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series provides a couple of fixes, an optimization and the code to do the selftests. While writing the selftests, a couple of issues were spotted with the circular buffer handling and the routine searching for the pattern multiple times. In addition, a small optimization has been found while investigating the bugs above. In order to write the selftest, the routine needed by the core code and the tests are wrapped into function which are always inline so the current code is not impacted by a new function call. There is no functional changes in this part. Finally, the selftest uses samples to insert values in the arrays and use them to predict the next event. These tests cover the most difficult part of the code. Daniel Lezcano (9): genirq/timings: Fix next event index function genirq/timings: Fix timings buffer inspection genirq/timings: Optimize the period detection speed genirq/timings: Use the min kernel macro genirq/timings: Encapsulate timings push genirq/timings: Encapsulate storing function genirq/timings: Add selftest for circular array genirq/timings: Add selftest for irqs circular buffer genirq/timings: Add selftest for next event computation kernel/irq/Makefile | 3 + kernel/irq/internals.h | 21 +- kernel/irq/timings.c | 458 +++++++++++++++++++++++++++++++++++++---- lib/Kconfig.debug | 9 + 4 files changed, 446 insertions(+), 45 deletions(-) -- 2.17.1