Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3436350rdh; Thu, 28 Sep 2023 11:30:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdWO1QXyvPdajHQ2BUTKGxu/WLsgSvjHHwEfcjNrg/kGbtovkTb8Lbqd5gxarLNPvwyG8o X-Received: by 2002:a17:90a:72c3:b0:26f:f272:144c with SMTP id l3-20020a17090a72c300b0026ff272144cmr1854437pjk.27.1695925822802; Thu, 28 Sep 2023 11:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695925822; cv=none; d=google.com; s=arc-20160816; b=kUR+PzT6pxCApYmdZbVIfodfPw5Zu5CVzOd5YFoackRwIqP9pD7zVAFC5lICOvECNL O2K5/qU/q4D1Q4BggcCiDaWk86noUs/VkOeDlcvZ7WQYSp9rg94DDTecFNuP2d4lQy4A Fc6GMipLCMIkPN6ZpMTu44+IM03BpqWgsuhCFdY/vSXhEB1JiuV6GYnJC0wDl1M9d3h6 UmhDA2Wxoh+3XmOguisw6OsAh7I10ez6JNrwuzSRMSnit4oNjjwWIGh80ucPAma4/V3S 1auj9195x1VA0VcKDgDCuMY6vXIEZ/zmNlS/NvhbaXZtJV3yyB1l5YNDMfStMwOirbOi Z0rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=8mQRi8ZNuvLxfOVIX7Pb/xHqZWWctvdJZZK30/RGLwA=; fh=pJkqZ4azBxyEPJKECvovabOxJztgQa2mLQiTqlvu87Q=; b=yLpEOeNXfJk4YAhUXQjW6zblLiqdw5BHmPyuQ5Dw+Cz9aU4wO3ezbCYm4bypD8O8Yg W9iprf6597CdM9nztrAq5Y5eo13lED+Lg2+yLDUgfe80zsiS9ES54ehXHVuZ2lwjZb7L 2tsS8XI2uaP7S5cKhVMw24nSVAvNnHpnayu6rCAwM5q40L4drXtH2o8NCQmAA7hGaUg5 rMtlmccDHe4JsRgCfUeH5RHPr/54dcKgkA5Xs0vK/pn+CYuqSOx2fLMQ7df1peNoOcA7 nuhR/NWLh7mpULj5WnBwN5npzWW6Qs9u7BGtgdTDSyXf4xslKvjuUWKU8quSFJMhHmkT VoxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WTwvY5Vp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id oo12-20020a17090b1c8c00b0027769e8672fsi11613386pjb.119.2023.09.28.11.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 11:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WTwvY5Vp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2576083746A9; Thu, 28 Sep 2023 09:19:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbjI1QTD (ORCPT + 99 others); Thu, 28 Sep 2023 12:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjI1QTC (ORCPT ); Thu, 28 Sep 2023 12:19:02 -0400 Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 110BC199; Thu, 28 Sep 2023 09:19:00 -0700 (PDT) Received: by mail-vk1-xa32.google.com with SMTP id 71dfb90a1353d-49a319c9e17so3542190e0c.1; Thu, 28 Sep 2023 09:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695917939; x=1696522739; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8mQRi8ZNuvLxfOVIX7Pb/xHqZWWctvdJZZK30/RGLwA=; b=WTwvY5VpW8WBQ5LmfvMNG6v2Mw60Pa3DohzF63fDMiFBCSS7g+5UjHdiRoQEdHGJk8 fOS8kKF2SO8IWs+4uMmEyct11CpXKkx4crXUzvUbXnpiQySRzl6fhoUlZRgTZgkvBoIh nHthBEGxfaK1VuVjhTORaXHTLbQxTiZc/Ji8iPe2IBi5UhqkDa629IykTfw19yEGQGrv z7zzt/1DYj0AhwSBp1ed4dzt2+Np9taPLFtNlgpKLfHq1cMHZIBhBX4E/qv2WewgzyMF jVgpBWx/3deOnhn2Tr1PehIJvumZzPcy/vOOXuUp5mcVnIqphsR1RTchFCHscHNEKFgx ZvTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695917939; x=1696522739; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8mQRi8ZNuvLxfOVIX7Pb/xHqZWWctvdJZZK30/RGLwA=; b=FjZLV5JNfg93O7Y4/Pl6jG4s5orTDmJjnUtuzqc0gylfyK03KypMlsmxDE9zZt9/St EPvqFnjj9dcIRHsk5mXw9SDmInXsJn5gY6yYnrdVbwPb4aABcveWckAW3ZKOdoaMYZVG MRb7bI++GyBREGm9aPcr98hSSTuKmJI81usLOuM7aqizSw1oRLBHkaVTj0gGkvofUryV G2lB9AWTxUgaQi1nLTaovUcXfi6p4yplsfmKd+ldWlDunKHHf8VHaHDXa7xQhd+XI8Yu dRYnCr/hj7PhkIIqn6fn0a0Sy7K/0OzeKbyb7grZVVA5pC+TDYRvUgxQVD8tDR92dtK9 ZKgA== X-Gm-Message-State: AOJu0YzpAEWNSuKzG/8cNVJAdDorjN9k/9XVoZl9JKoN2UOClFu6gmJQ AeZXZ3MHxNnsRBJHasVYO+AFYyGKXSJh6UxF/G4= X-Received: by 2002:a1f:49c5:0:b0:496:b3b7:5d4c with SMTP id w188-20020a1f49c5000000b00496b3b75d4cmr1343220vka.16.1695917939028; Thu, 28 Sep 2023 09:18:59 -0700 (PDT) MIME-Version: 1.0 References: <20230928104520.24768-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <4e4bf02b-2264-491e-9b71-ae3b5ad7fc39@sifive.com> In-Reply-To: <4e4bf02b-2264-491e-9b71-ae3b5ad7fc39@sifive.com> From: "Lad, Prabhakar" Date: Thu, 28 Sep 2023 17:18:12 +0100 Message-ID: Subject: Re: [PATCH] clocksource/drivers/riscv: Increase the clock_event rating To: Samuel Holland Cc: Daniel Lezcano , Thomas Gleixner , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Anup Patel , Geert Uytterhoeven , Conor Dooley , Biju Das , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 09:19:16 -0700 (PDT) Hi Samuel, On Thu, Sep 28, 2023 at 5:04=E2=80=AFPM Samuel Holland wrote: > > On 2023-09-28 5:45 AM, Prabhakar wrote: > > From: Lad Prabhakar > > > > Renesas RZ/Five SoC has OSTM blocks which can be used for clock_event a= nd > > clocksource [0]. The clock_event rating for the OSTM is set 300 but > > whereas the rating for riscv-timer clock_event is set to 100 due to whi= ch > > the kernel is choosing OSTM for clock_event. > > > > As riscv-timer is much more efficient than MMIO clock_event, increase t= he > > rating to 400 so that the kernel prefers riscv-timer over the MMIO base= d > > clock_event. > > This is only true if you have the Sstc extension and can set stimecmp dir= ectly. > Otherwise you have the overhead of an SBI call, which is going to be much= higher > than an MMIO write. So the rating should depend on Sstc, as in this patch= : > > https://lore.kernel.org/linux-riscv/20230710131902.1459180-3-apatel@venta= namicro.com/ > Thank you for the pointer. Do you know any tool/util which I can use to make comparisons? Cheers, Prabhakar