Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2867250pxb; Tue, 13 Apr 2021 12:09:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyToQQQy0GIxZP+nNSfDKpBsZzNKosLgYRAs19huP+3gDucfw03Sj5fWMPUUq40muwez40 X-Received: by 2002:a17:907:2bf6:: with SMTP id gv54mr34554672ejc.514.1618340990964; Tue, 13 Apr 2021 12:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618340990; cv=none; d=google.com; s=arc-20160816; b=eF0KBlw93glWYVE5nh1YFSRnOzHUmvAPvbRD3NvrClLgu9XRd3dNpHTwhNhnP0ryon oWerlD7lScfh8FeqGT+8rRL4bECfRikUi2+7Un3mex6+ef28LbplmhQP8f881YKBWd06 FoVjYOz3zaI3YgaPnNvtc874LllNgnfO9IZTET9S1YZu8jzsYVTY2k1pk6UabarpHpbz f9pnoYJSVJPpqLD0uKr+QTyjValjjeE/PiMx3v/j0O0OIlSDytVMeaUzDvLuMaOqwF1F VpYdEcuF4VA2GYeIf1zAHxloT9NNmMeNp3BnN4hu8QypEKuwoOR4ivy86YX97Y1VyUhR jgfA== 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:in-reply-to :references:mime-version:dkim-signature; bh=CaG9SlK2TqX99hyj4X3DH5qQ2uV7HTsovkwb7Rge0m0=; b=cpuuYS95G238jZR6tsk77GEvTZikp1YnoTRAN4oHbvS56/OmPFcZ70m2WU1USKNLXB YpvobKYXXD/iI+UUgCV/zvuurnPmSohMIE5bqXuTAa7FAHD76LP4H+E+ehqRGkSq2qVf +rMFa2RLOJMaBDK1zlxJNE8whho29w0zSlZh2urf1C/GeFgk5dexFt9VHm9mxQHpslKm Zz4QXu0XZITxzLhP6puHxGVp6jUoNQdLWdDwYeifeVF4Sdf3N7dlPcB6dea8F94dkPD0 jsIBQwc7zeK0fLkuPBiHKN0PiInHnwPJwMT47xefRrYCuwcxY6+RrHRqM6g4qPTB8bZs IFmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@telus.net header.s=google header.b=OLZX5pjB; 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=telus.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si11496800edv.49.2021.04.13.12.09.27; Tue, 13 Apr 2021 12:09:50 -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=@telus.net header.s=google header.b=OLZX5pjB; 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=telus.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbhDMOwm (ORCPT + 99 others); Tue, 13 Apr 2021 10:52:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbhDMOwl (ORCPT ); Tue, 13 Apr 2021 10:52:41 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FFE2C06175F for ; Tue, 13 Apr 2021 07:52:22 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id e186so17338382iof.7 for ; Tue, 13 Apr 2021 07:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CaG9SlK2TqX99hyj4X3DH5qQ2uV7HTsovkwb7Rge0m0=; b=OLZX5pjB4+Qr6jM0mMsqBEBVXYfIiHD0F7lzBGhl3NJKceaJtqhcH7L6PIu3gGrw9y OgGRhSeVFCyzHM+uawZvUpGuwpSIQNh0annQ3+zlcE1R16Tz7MuZofY6tF1tUnJKytHF d+imtLuTxc81AIJMIFjTwkm1H09XGIXAmFp1OWqjOQqU4JxczaIPfuO/vWD5iEAiCXTf 8/ym8y8ofR3AYzveO5TSyIw3pC4g4YfI8zyAglmSRaAvBF5KJik4il01hbUjGgDBfkbL fcbq1nxUQ7UVo1YKVgl6sMXqfn+sot1o0hXM9X4hXo38v+1WOSHvjSfbqWMKVTiWlCkR N0eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CaG9SlK2TqX99hyj4X3DH5qQ2uV7HTsovkwb7Rge0m0=; b=cE5RM/TkRQg/ox2l52kSqrus7zQRSUucVC69I6/FpMRS4b7oNdqfC1F7PK6HNA0cUi HfnKzycqgphzh9hG6q8Fo1rWMWAWgI/bVOYSPzqbNS7ricAYCQLUZgT1WhrQd9ER/Qsd OETc41naLBw5DinL8PACjsZuXC/E3g1MYLTYOb/hIdTHLOiPqPGRuxBuwE1uagrI4EOS OOmKB2BlLaSbshJwntlIqj0l+8E2ePay9N98UnmarBCMIA9nDdMHDGYpmH/qtH9/2uK5 PbMtM+t8XvHg4A67cBF5mpg1CfjWuemN7gEKX2jx55bVEjkXbOPMLFZA7CKSYLGALXWu 6vhw== X-Gm-Message-State: AOAM532ySvi9vplVtOZpEUbBqWvlVTwQ7q8NHBrLdByj2hqVXzAxpPSq pvw/POr/+2QP5bdvALg4VaGa3y7tsjbfUiJNAVQqGA== X-Received: by 2002:a05:6638:ecf:: with SMTP id q15mr3950964jas.129.1618325541042; Tue, 13 Apr 2021 07:52:21 -0700 (PDT) MIME-Version: 1.0 References: <20210412074309.38484-1-psampat@linux.ibm.com> In-Reply-To: <20210412074309.38484-1-psampat@linux.ibm.com> From: Doug Smythies Date: Tue, 13 Apr 2021 07:52:14 -0700 Message-ID: Subject: Re: [RFC v4 0/2] CPU-Idle latency selftest framework To: Pratik Rajesh Sampat Cc: rjw@rjwysocki.net, Daniel Lezcano , shuah@kernel.org, ego@linux.vnet.ibm.com, svaidy@linux.ibm.com, Linux PM list , Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, pratik.r.sampat@gmail.com, dsmythies Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pratik, V4 seems fine. Thank you. On Mon, Apr 12, 2021 at 12:43 AM Pratik Rajesh Sampat wrote: > > Changelog v3-->v4 > Based on review comments by Doug Smythies, > 1. Parsing the thread_siblings_list for CPU topology information to > correctly identify the cores the test should run on in > default(quick) mode. > 2. The source CPU to source CPU interaction in the IPI test will always > result in a lower latency and cause a bias in the average, hence > avoid adding the latency to be averaged for same cpu IPIs. The > latency will still be displayed in the detailed logs. > > RFC v3: https://lkml.org/lkml/2021/4/4/31 Example output for an Intel i5-10600K, HWP active, performance mode. System very idle: $ sudo ./cpuidle.sh -v -i Inserting /lib/modules/5.12.0-rc7-prs-v4/kernel/drivers/cpuidle/test-cpuidle_latency.ko module --IPI Latency Test--- Baseline Avg IPI latency(ns): 686 Observed Avg IPI latency(ns) - State 0: 468 Observed Avg IPI latency(ns) - State 1: 956 Observed Avg IPI latency(ns) - State 2: 17936 Observed Avg IPI latency(ns) - State 3: 17968 --Timeout Latency Test-- Baseline Avg timeout diff(ns): 445 Observed Avg timeout diff(ns) - State 0: 377 Observed Avg timeout diff(ns) - State 1: 630 Observed Avg timeout diff(ns) - State 2: 322812 Observed Avg timeout diff(ns) - State 3: 306067 Removing /lib/modules/5.12.0-rc7-prs-v4/kernel/drivers/cpuidle/test-cpuidle_latency.ko module Full Output logged at: cpuidle.log $ grep . /sys/devices/system/cpu/cpu7/cpuidle/state*/residency /sys/devices/system/cpu/cpu7/cpuidle/state0/residency:0 /sys/devices/system/cpu/cpu7/cpuidle/state1/residency:1 /sys/devices/system/cpu/cpu7/cpuidle/state2/residency:360 /sys/devices/system/cpu/cpu7/cpuidle/state3/residency:3102 $ grep . /sys/devices/system/cpu/cpu7/cpuidle/state*/latency /sys/devices/system/cpu/cpu7/cpuidle/state0/latency:0 /sys/devices/system/cpu/cpu7/cpuidle/state1/latency:1 /sys/devices/system/cpu/cpu7/cpuidle/state2/latency:120 /sys/devices/system/cpu/cpu7/cpuidle/state3/latency:1034 ... Doug