From patchwork Mon May 27 20:55:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 165223 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7616488ili; Mon, 27 May 2019 13:55:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDjeBK0uzCY9g+smJ58RJP9SXXy6Pckbl4w3aF5DBsVqralPKyMArv0RJsKoe7U8dwIGLB X-Received: by 2002:a65:624f:: with SMTP id q15mr128169495pgv.436.1558990546598; Mon, 27 May 2019 13:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558990546; cv=none; d=google.com; s=arc-20160816; b=SXnoDRLWPp7Vw3wmLgrA7PidGZK6FKyHTNhBNO46FXgozvUi7USD9p/ZdciHqBpL8e r4J252kJGldR2sh1gvQfNXPBi0Hj6bDWkA64qNix3lngex82fBXe5F9A/lJpHuUPsUB8 yY9Sx98oM8J5smZJn8PpQ6c1z5zrJNcngUPgkMBLZPXyjFIHMP6Voc9lBUtfsxdJv37e jN7JMgyZjhd8wfAk8S1xNzLbIvKoKGQncN6e94YpaxBInvo6aJ2fICGrbZjg/s3pD9ve flP0srYFT1Jo5lRpu69JxlMzOYwmusnZ3Ld/H2rfo5iUBujp6aUWxm+vmpu9wEvDXhBq vEbQ== 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=Ur+WNbALZbEGPYM1YE6I5hTSUWBeND5/RyZBRQmTaD4=; b=WuHskZ0jhxy4FGB3/bZU5T5VpUEclWQAYpTkichmNzZbjT6yjg5dO5zTs6Fdq4hA+a O5rUr7cjZO3eUb3oGufnE4JhvzOuQ74pLgU5klhU44YHX5ZG/zvtCrMvPQeD1CaliH2s QZcq+o+Is1zNKl+ZdTABa3j+cdFjjbzYBc7H/LGuLMl/xn7Y0zOOY4dzTa+e+1FG/OEp ZwDuk4YZGBLTaN7uHLlSxCPvqsOOUmzkbe9kbX82DEa/iWJdPgB8STGv81TCvSU/SkB0 OTdpNkLp/s8tmASel53QxuO3zsWtkJTv3UVlneNKqWe5W7DQ828aLaYty6ufeVIZuA7V Clnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D2INj9p0; 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 31si20378810plb.30.2019.05.27.13.55.46; Mon, 27 May 2019 13:55:46 -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=D2INj9p0; 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 S1727161AbfE0Uzn (ORCPT + 30 others); Mon, 27 May 2019 16:55:43 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54957 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbfE0Uzm (ORCPT ); Mon, 27 May 2019 16:55:42 -0400 Received: by mail-wm1-f67.google.com with SMTP id i3so611195wml.4 for ; Mon, 27 May 2019 13:55:41 -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=Ur+WNbALZbEGPYM1YE6I5hTSUWBeND5/RyZBRQmTaD4=; b=D2INj9p03NHKUheHBSr4k6xqjLvyDDFn5a56ckp2YQ8f6z9VkIhyk/j8uzXyR3+ump SmRXNF7GJnz+wfjeWsSQM+fM3s1mvL8VqiXzWOfzbnWvVkveoEzheuFxpOLaqy5gk0DG bREd0UPsW/hKEUMOPG+Ws/J6MD96gWr7zVVNvocKil93Jv0oMBTbjm7OypB68NwPDxNW srUrgy9ETNbJXLkVlPo9O+eyeyYYiOjugj02J4TsyTwDAYx6eIoyScP9TNcjS8/fkQJ/ dahzoQV3eBRPnj+WaCcgyaulXprxdA0cM8LPBrDKlhi+aRsaIGBiqPNrotBZilz/jLUa Hqqw== 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=Ur+WNbALZbEGPYM1YE6I5hTSUWBeND5/RyZBRQmTaD4=; b=AYZlAez5zITO2C/x7iNvIHwViPXLpQY72wJrNtSvraqlNn+TwtPKcx0COl461+FYkM VzI5NF8fX0su9GwCEsQrok6O/0nT5bbefhjgr2irFEBLp0SROCcvNqi3HU1DWXJB3y7c f7PnguowMdDvoSeMQmt0PuYYeewneA8CEdmLlT46Wlk2SGCiiJjzszPZzwPI6r5s8eOI zkqAAlQw+73/RbIOH3gyMfmLqVUOp4f3KUEHuFMNZyXuSptLC101AhTn6T1KIz/jnxzM riW4JjkDJyjwGCpGn4V7/4Fj+Bpa2ux4QcmBGer8AfywB64+/lHnGiqe+IJ55OHuz+/8 g22Q== X-Gm-Message-State: APjAAAWpgd3KVX2QrIoEvrsGaKsKpnGi7xXD3O6B8AKOBjk+szwq5sfe 7uHlMLJ9W8pkyVyGVLR2D0VkdS62nas= X-Received: by 2002:a1c:7606:: with SMTP id r6mr617944wmc.25.1558990540404; Mon, 27 May 2019 13:55:40 -0700 (PDT) Received: from clegane.local (30.94.129.77.rev.sfr.net. [77.129.94.30]) by smtp.gmail.com with ESMTPSA id a1sm388565wmj.23.2019.05.27.13.55.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 13:55:39 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com Subject: [PATCH V3 0/8] genirq/timings: Fixes and selftests Date: Mon, 27 May 2019 22:55:13 +0200 Message-Id: <20190527205521.12091-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. Changelog: V3: - Removed patch using the min macro - Fixed comment typos in patch 1/8 V2: - Removed defaulting to 'n' as it is already the case *** BLURB HERE *** Daniel Lezcano (8): genirq/timings: Fix next event index function genirq/timings: Fix timings buffer inspection genirq/timings: Optimize the period detection speed 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 | 453 +++++++++++++++++++++++++++++++++++++---- lib/Kconfig.debug | 8 + 4 files changed, 442 insertions(+), 43 deletions(-) -- 2.17.1