From patchwork Fri May 24 11:16:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 165103 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3437467ili; Fri, 24 May 2019 04:16:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiQa/lYJWoI4l9V7Wzc9TAG0Gb2VGZM5XMtWdQJuYuVGHuopx5wlWrq56DRJ10hCwgKB40 X-Received: by 2002:a63:1224:: with SMTP id h36mr12976837pgl.9.1558696598830; Fri, 24 May 2019 04:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558696598; cv=none; d=google.com; s=arc-20160816; b=fduRZNtUpGfw20h2xCnxa93LuT9GcLNrVhrskDwtuUdBEzFfox9IZ+lhGoCvgt7klf VFxdJWNrOHDqKi516b+B1bLDbTAm1k8pSP9uldsC+//sn5qrbGadws724VzFVBLectXs DuWJMV0ZLOfos5cMFTyhlkPga5iZ/SwRXAxHczITCm3+6whHWIAFngONQzI12mZD2XAH 9/XmMMtrWlJCl8erzaVMxLbJO94yVWKXZU2nUqwSjeEWx0l6RfN+LN5rxjPQBh8RRfMb 71z+WlePzPhqg+zS5XZXggnyR5BwOt6wHteE7vk0ArKLS8ZMH22zI868PPHXGzYO6TPR FNcw== 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=0j4i2J4EeszNjwRF8F3m6xPyIjfO+MOVuVKbdSEJWUQ=; b=mff4StDzdbisX8Pv7Xc916Y83fe1ZyTbZvVNpencx1OfNHG83Ex9c//8f9uqstkbvL alWyDokaVvz5mfGT/ad43Otnjw8E0lk8NNiBTINHhCY3uTTY6ZD6y00JWEpiF/lydbvt 5FFF18m9PdUgTSVPjvBqrYXB8ip9dODO5KzRzAHVKEPphcGQ2HjpZytIMjdf3QwevRdP 9TZdFMwvKKB2sngRycyQx5+hVCpIN/u3yxwQ5lQ1gLQCuG+lFs0Wzs196WN/3qOqNA/V N1W3CSSzriFffvTueThRKLBrAQa60J5d9w2pSXZ8EMy2uSL5RrX3CbMMs79RMs0kIXUV SZBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xmgm6LOj; 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 b1si3735560pgg.392.2019.05.24.04.16.38; Fri, 24 May 2019 04:16:38 -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=Xmgm6LOj; 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 S2390841AbfEXLQh (ORCPT + 30 others); Fri, 24 May 2019 07:16:37 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41777 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390410AbfEXLQg (ORCPT ); Fri, 24 May 2019 07:16:36 -0400 Received: by mail-wr1-f67.google.com with SMTP id u16so5708640wrn.8 for ; Fri, 24 May 2019 04:16:35 -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=0j4i2J4EeszNjwRF8F3m6xPyIjfO+MOVuVKbdSEJWUQ=; b=Xmgm6LOjczjlBpGlalrNHIFGzjQKW1ZDiVs4Z3Bi4Ny4nPS98lbXSEQV5oEIEkQB9o /PnZlkg5xOGoUsLFcyHqD2LGiAPxLTimvUSG+X2f7PanxvbaFza8PthyZ12kk23Sqo+Q 7WGEI09BYEGj9kaloXxOey2eSYHwwSHVkB9y8NOJcV8Lb18j2aLruGJmFI/adrFOFxCp 9BCfDAaG3+ZjDKT8MU5h3pEhAofnUAa7wrhTWBfJ+qntjq2qNvLNYuA62jNAyrRA8CuE xZQutS8xoBVvRl+RNSPPukmcyWnX0x0YRe9lUaOGsMJxDArA4PYg2PgQ9MBznRdr1LA/ BeLQ== 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=0j4i2J4EeszNjwRF8F3m6xPyIjfO+MOVuVKbdSEJWUQ=; b=LLsIxQlFNZbZzfw/gznX9I/27XEGUMVuUIZDagzmpbG3HGkSDDs0+o0Bc4z+WN/p/j tD5D3boq12uSKYP87ccwTFh13GbZK0vNFiLpBe354mTnbhG4Y7s4lQI0OdRpgbem+nCT weauoVQ12Cj6jKDr7I8UPbqlnhDzzHLQjxe9RYvi7QB5AF4JAJzP9CpAtyc+X2W/0RzT WqiDDCehbFlYzqN7n0WZ+tp03RvCH+HVpCUfyYfeX0RhFcrfkips9TSmwR4t/AxJhjY2 hJCQsJSPCf08O58DXguz0pm4r0pEEkqktPWK6WutP+MiakNwPq8Z6a+Mxb0XIUood/b9 bLVw== X-Gm-Message-State: APjAAAWO43sxJAaaVMiG0KluNMx7y/K+xJboJXQ8T5gdb520dtWaFT0S /c9P2CWjWnQ+gP71yzpzoYJb5Q== X-Received: by 2002:adf:ef83:: with SMTP id d3mr81276wro.253.1558696594810; Fri, 24 May 2019 04:16:34 -0700 (PDT) Received: from clegane.local (73.82.95.92.rev.sfr.net. [92.95.82.73]) by smtp.gmail.com with ESMTPSA id h12sm2575392wre.14.2019.05.24.04.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 04:16:33 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com Subject: [PATCH V2 0/9] genirq/timings: Fixes and selftests Date: Fri, 24 May 2019 13:16:06 +0200 Message-Id: <20190524111615.4891-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: V2: - remove defaulting to 'n' as it is already the case 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 | 8 + 4 files changed, 445 insertions(+), 45 deletions(-) -- 2.17.1