Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp788786ybh; Tue, 21 Jul 2020 08:00:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx03wtPz5Eiwo6zyOjupZQXaCMnwN4WcuyuMvnePhVFrzunm/qSLV5LJ1JMBPz+EeCCX7am X-Received: by 2002:a50:e883:: with SMTP id f3mr26834657edn.220.1595343633993; Tue, 21 Jul 2020 08:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595343633; cv=none; d=google.com; s=arc-20160816; b=dYvAHT+NQFICNUC/DXd3Z5uA9FIg3+1zEZARa2Sp6JqsdTqnSygxBnaEht+h9QiJPt DCgvX8rzKjlP/AF9OcRrKVGU4zuuay1wiyjWNkBON5bNVYVgDgqIsqSxa8EyOxBrrGme lpouJHXJGNXG3NF6mbsei1+OQ2XMZDBvEdaD4rcuZLaSNQFeVVc/jiZ5JVNNwprHXn3P ovqqZbKsz2Qf4E1beGtIMz+k+JQnNCqzfElGtCWLZIx0yiE4VbEkNE3miqzns3cIrc+W VtazDE5s9IjOHXOi7Xr9ttDl9YmR7gRgII3W8lQTpNNiHmcoBtvFh672qD8N2anSD5F3 cWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=P69TuXHvKNdQBsX1NlqieN+/6fhlcIyh2dYab6XhtNw=; b=QZ/3Fvk6MXg1E4R7Kl2nWQb4bnz0sIlk76G9xibtw1APWEz1y8bcZrMe1gjtxmbIJx qXfChMdD9YfCpMeureakCW33pf9TOKkUVYSJvf/Tm3V5n20fKSybow/eeti+Lu7aGC+/ S/XWE/GsIWhfv3FbdTKxXlyEcZofsaxNgEVMDK7RK4BXwzWFr6tCt13QdqnjgmA/e7Hm XUWqOhWft0c8vq4qUZ/usPXZVmE+Ks/V0NUT6ghR7ByUHBO+pTVQBxjAVXjTlRIE90XH htgI0Cn0fTjGk12k7dd4/gyHWpFCA1el49AOLp4UYa7NBdp06vqgwcNBcfI++Q3bwB4K DuZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SnBgx4Gz; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si12194667ejw.207.2020.07.21.08.00.09; Tue, 21 Jul 2020 08:00:33 -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=@linaro.org header.s=google header.b=SnBgx4Gz; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728896AbgGUO6A (ORCPT + 99 others); Tue, 21 Jul 2020 10:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbgGUO57 (ORCPT ); Tue, 21 Jul 2020 10:57:59 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE29C0619DA for ; Tue, 21 Jul 2020 07:57:59 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id f18so3191316wml.3 for ; Tue, 21 Jul 2020 07:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=P69TuXHvKNdQBsX1NlqieN+/6fhlcIyh2dYab6XhtNw=; b=SnBgx4Gzfcfd974HbTiO6hEVYFWvZ58XMHaSjnkdia94BS6Kfyy1kSjtt3SLY1jUwv nm5CGZ2YELLVOYdBig3YU9pqubCGvfIDE8T8yGs2i9lZ8ybJJJ/2U0TBNvbiM5Nm5efU Az0OUSooBItyLMK6Fiez5Ddx3TmQCjL5cU9trk1HvY05OqnsAgO6fXfwLIHzBa1rJXvV bAWNI7etXswlx2uGkFWCmkk29lxfKaFMwIYCOWBThBiCp3vZb2yWMP9esJ0sMpRrD5tl TWV7N1u34O7ubcmuhTr7L+oZlbdBCC4dA24VCxg2SD0elWD72u1wvTJvYpnZG7vumr4C rpsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P69TuXHvKNdQBsX1NlqieN+/6fhlcIyh2dYab6XhtNw=; b=B3WeVBD0aRsYEwanNhtEXUMseb81B/N7ihKaWXG7s3f39eebny4IsQ8QkD/QfwQluv I+ZYhmnfDhp+7uYuk1DiugayqnPXiaVV8BfapVPnoHCsIh9RPFB3nwfl7uTeO8L1Bl1f ae+PWIp13IvjgkwCFiksEWxV8NZq5oThiLqkVZW6iflhZgPUB6/YgvZKSZ4+Cp1i1Jdo xayXXCopJc8MdGK4kw1W/00xb9j3rIX9A2/52WvM+d8aiE21vjawWsZkc5sgzkvKIzR6 3Li9zQGE8vE/OPlSHq4Etmgv3q9nMfH/6r8NSP67BdLdjI0gm4yGdcwbEjY6ZaRo7iuH AlUQ== X-Gm-Message-State: AOAM533Wf+2gXgwK8fsC7bi93T8lpMt/MePa2m6dkZ13o+8+a+QeQD+h ALV4LvuHOm8Tb8YY82VUJSjbRw== X-Received: by 2002:a05:600c:2f88:: with SMTP id t8mr4396008wmn.186.1595343477981; Tue, 21 Jul 2020 07:57:57 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:c144:5385:c824:85ce? ([2a01:e34:ed2f:f020:c144:5385:c824:85ce]) by smtp.googlemail.com with ESMTPSA id d18sm40382259wrj.8.2020.07.21.07.57.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 07:57:57 -0700 (PDT) Subject: Re: [PATCH v3 0/2] Selftest for cpuidle latency measurement To: Pratik Rajesh Sampat , rjw@rjwysocki.net, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, srivatsa@csail.mit.edu, shuah@kernel.org, npiggin@gmail.com, ego@linux.vnet.ibm.com, svaidy@linux.ibm.com, pratik.r.sampat@gmail.com, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20200721124300.65615-1-psampat@linux.ibm.com> From: Daniel Lezcano Message-ID: <17e884b8-09d8-98a8-3890-bf506d2cdfca@linaro.org> Date: Tue, 21 Jul 2020 16:57:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200721124300.65615-1-psampat@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/07/2020 14:42, Pratik Rajesh Sampat wrote: > v2: https://lkml.org/lkml/2020/7/17/369 > Changelog v2-->v3 > Based on comments from Gautham R. Shenoy adding the following in the > selftest, > 1. Grepping modules to determine if already loaded > 2. Wrapper to enable/disable states > 3. Preventing any operation/test on offlined CPUs > --- > > The patch series introduces a mechanism to measure wakeup latency for > IPI and timer based interrupts > The motivation behind this series is to find significant deviations > behind advertised latency and resisdency values Why do you want to measure for the timer and the IPI ? Whatever the source of the wakeup, the exit latency remains the same, no ? Is all this kernel-ish code really needed ? What about using a highres periodic timer and make it expires every eg. 50ms x 2400, so it is 120 secondes and measure the deviation. Repeat the operation for each idle states. And in order to make it as much accurate as possible, set the program affinity on a CPU and isolate this one by preventing other processes to be scheduled on and migrate the interrupts on the other CPUs. That will be all userspace code, no? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog