Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2497864rdb; Thu, 21 Sep 2023 23:31:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaWwx8ponwSw4fQV7nG2ySYmw/lpgScXyf7wavbxbztKWOp7X0dOI10135y01fEP2TeYku X-Received: by 2002:a05:6a20:394c:b0:13e:1d49:7249 with SMTP id r12-20020a056a20394c00b0013e1d497249mr6821889pzg.2.1695364276439; Thu, 21 Sep 2023 23:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695364276; cv=none; d=google.com; s=arc-20160816; b=r3SBV+4VcRFK46YtKibbSBAWShlRTJtafaph2IoMq2yLDk2/GD3svweuXrdhpPiPv2 7dGmTOQ8Id+7zJpyFeeQ9d4Lxz3vVPtu2IJkHFrN1MTmqsPsiXuQIlUe+qpzhHcIaG2J M2Om/+FhjzpPdn22CECDcdwXr2/YRQrczrohvVO8rQUtIZYTX4LqZPl2Z/G0jaoAZp6t cGYV0DZfZGfSnevTyCKBH3p8OGBnkEnyUPa+3QlAOJdNAnlkBIPbmzdY+KlE8oWcj+lI ZHzb8Pm/Bw9GmhCJiiZ3jDkEgcaR5PXkld9VezrAUKgZO7i3dqeHD9fsK6T+xxsBVAHi Cxew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=bX9898W4DHPQgbdu2jfMPofkblqEnbzz8c5KFbbLPQo=; fh=Xs7bP+WhU7IwxL/NoUxfx7vjWB/jlqVoKvUJlYlO5cw=; b=k6LDrpx0nahlfPUK0waHn5nQzXVH1JkKqb3Vyd/HWpYb0hJRle9KixUbnR0xJboet7 7bHw2gnLuFpqt4tqChMg+37d5l2QHFHvRvyHoAHiaDlKiZyPV0u9GHWIRVRVvf/16WK3 rE95KvuEUMQmIN11wIeB0MWSpeY2fBBCzDzmrbuMpaIX/VzwmKzkuAkdz8XnWA1LP0hh YtE92d6kimiXTMyBDOnT6p6BzPC2pRDqu4BZEpVUpVmSRR8E09mJa9b5zFW+/z+V/I0l bX7DyH8/AUIpgdo6wVGqDV0IDdrGpxNl1q+wyFqTQBNWuma68ZlwYhq729HS7Y9V9gyK tZvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Vjmw/9Yr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id pg1-20020a17090b1e0100b00271a9dda68csi2226716pjb.131.2023.09.21.23.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 23:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Vjmw/9Yr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E2C828313D2C; Thu, 21 Sep 2023 16:41:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbjIUXl2 (ORCPT + 99 others); Thu, 21 Sep 2023 19:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjIUXl1 (ORCPT ); Thu, 21 Sep 2023 19:41:27 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B992F4; Thu, 21 Sep 2023 16:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1695339675; bh=bX9898W4DHPQgbdu2jfMPofkblqEnbzz8c5KFbbLPQo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Vjmw/9YrBmUs0JBH+tAWqE9VhYUn3cMu5lM0EfxOQue+11jQZrl0pH4fF+Ltn7OB0 3nZ0f/C4LA/joz4t/E2YSTguB8y1fObmI1qPuBYWtdQ+GH93vhfjpPjaDbUe9ERx6s 7R1T061RtAE1Jca/jkf8XQuBV1hBRmpMPp+2cSILJ9cRJIrR1GXs/z3CmzXz04JQ70 3tir4+ZCgGBAeQyv7MWI6tLr6GlSMUtt4plxAsAdJk8x4faRB5U1/esdDkfUg63ovL D168caCBRrYAgLOWZsDUbeKeHT2D/kx3pW3E+FCHp6J/UCCiWjk/uiePxRM1aNedT/ z02ajjQYfmbJQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4RsBk31wB3z4wy2; Fri, 22 Sep 2023 09:41:15 +1000 (AEST) From: Michael Ellerman To: Aboorva Devarajan Cc: sshegde@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com, npiggin@gmail.com, rmclure@linux.ibm.com, arnd@arndb.de, joel@jms.id.au, shuah@kernel.org, linux-kselftest@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, pratik.r.sampat@gmail.com Subject: Re: [RFC v3 1/2] powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events In-Reply-To: <50798cd4558299eb62e2c3a11e367a6dbe11f915.camel@linux.vnet.ibm.com> References: <20230911053620.87973-1-aboorvad@linux.vnet.ibm.com> <20230911053620.87973-2-aboorvad@linux.vnet.ibm.com> <87a5trvw88.fsf@mail.lhotse> <50798cd4558299eb62e2c3a11e367a6dbe11f915.camel@linux.vnet.ibm.com> Date: Fri, 22 Sep 2023 09:41:14 +1000 Message-ID: <87r0mrm6w5.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 21 Sep 2023 16:41:28 -0700 (PDT) Aboorva Devarajan writes: > On Wed, 2023-09-13 at 08:54 +1000, Michael Ellerman wrote: >> Aboorva Devarajan writes: >> > From: Pratik R. Sampat >> > >> > Introduce a mechanism to fire directed IPIs from a source CPU to a >> > specified target CPU and measure the time incurred on waking up the >> > target CPU in response. >> > >> > Also, introduce a mechanism to queue a hrtimer on a specified CPU >> > and >> > subsequently measure the time taken to wakeup the CPU. >> > >> > Define a simple debugfs interface that allows for adjusting the >> > settings to trigger IPI and timer events on a designated CPU, and >> > to >> > observe the resulting cpuidle wakeup latencies. >> > >> > Reviewed-by: Srikar Dronamraju >> > Signed-off-by: Pratik R. Sampat >> > Signed-off-by: Aboorva Devarajan >> > --- >> > arch/powerpc/Kconfig.debug | 10 ++ >> > arch/powerpc/kernel/Makefile | 1 + >> > arch/powerpc/kernel/test_cpuidle_latency.c | 154 >> > +++++++++++++++++++++ >> >> I don't see anything here that's powerpc specific? >> >> Which makes me wonder 1) could this be done with some existing >> generic >> mechanism?, and 2) if not can this test code be made generic. >> >> At the very least this should be Cc'ed to the cpuidle lists & >> maintainers given it's a test for cpuidle latency :) >> >> cheers > > Hi Michael, > > Thanks a lot for taking a look at this. > > Yes, this test-case can be used as a generic benchmark for evaluating > CPU idle latencies across different architectures, as it has thus far > been exclusively tested and used on PowerPC, so we thought it would be > more beneficial to incorporate it into a PowerPC specific self-test > suite. But I will work on making it a generic self-test and send across > a v4. I'd suggest just posting v3 again but Cc'ing the cpuidle lists & maintainers, to see if there is any interest in making it generic. cheers