From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21E2918FA0D for ; Wed, 10 Jul 2024 09:39:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720604381; cv=none; b=sc1Z24QFUvtl+fiC/6q30fYZuoLpcet6pEF5ji6zFAQH8jnURaX2G7J3/J8pK8ZgYLf1jTCiYGFJQFJ0bxo95aPMtJna/WP6QL2Rfc+zWIW8eGZTZmOD9pZcR26JZbfO8+IAtPFue46+DCSJyvW5412pCOXxSYNOHANIjGBXvqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720604381; c=relaxed/simple; bh=cxtEiy+7tR/t7lkZzdUeJaDgyf2ynisU5m3GLGZQV+k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ZOBi5R+TpY/T5qgDYyyYPINd8J7pYzPtWBbroRpWvMkF2Dh5NYcGKYJUZBoLy/TlEHCA6/e2r5GUXyH7pcVv3FLyB/cIKfrOKV2WDZLdKxg4O4Ncq1Jz/96Zx0aLeMaPB9JTTMowi/+sHCW6twXCbLSbvYcYMAguA7rPvMxxbug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Aha13ut8; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Aha13ut8" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52e9f863c46so6656194e87.1 for ; Wed, 10 Jul 2024 02:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1720604377; x=1721209177; darn=vger.kernel.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ARVuzbVHjxxG9dv9mtR/lCDpdt7FDrvxjkqdsUuuHF8=; b=Aha13ut8dblHu0ABPDwI2kSoZ9SFD7Bvf9rgZkld4VATzEQYgx0eqIQzx/2VdTHpF2 1px2UkPPqR7oAUuqUcxiU6tjPtw0R9od6D5NJUSad2M5uHptuV15ayLc6vU7kw1umRkn O3BMOBo0OiXN94YsZyal9FZI5gFK3HCxit87kyQns7z/skvTDwEb5UlKw690vhHkTCFU iDLJBU5KTYS/kUcljpKezM1pkCXLUDTUkCMxwsl+FbmBvIYwskC7ww82+kRng0PuPI00 mbGXVe9M8464iY2JEH9UY9ZmqLseW3zx+mC2r+NlRIHfIQtsLEZvpW4q7s2OTj3HsPQ4 EsGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720604377; x=1721209177; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ARVuzbVHjxxG9dv9mtR/lCDpdt7FDrvxjkqdsUuuHF8=; b=kbA+TpUUxxZiGk6Q3TrpbR5n4ZxvJM9e8xtxhQVmz3NgJTHasTNg/A+0ts1Q3NRnOY PcVR+ctprMVmk2U7Ko40OGIGJ9b4f9hXezDIn6grBgWTCGru2p/DAodTYkLZL8Q3K/o8 hGFFh5+DtCNvd25THQh5/RiavV5Ca1366XXso5Hs7wb5CbyJOY1CUb1sc+g6tCTbqJmj Fx6/tRHaiGfa8o8SaSwjlUGP/5ykJLtiXkYcMgJTbhyXG/RUVo02rFYdfUG53Z9tfYQV bLOVY4eb1Tt/o0E9alqTPR0CSZxmGk11UItNLkG1wnE3PdvYe1MGvjcJaTUeyIBnJd// l/xA== X-Forwarded-Encrypted: i=1; AJvYcCXEPv8Pf8fj629TrUNIWpj3nWryoiSBMLnKIw2CKPNm+KoDYDXdDxkBxJAtMs0OqfuuTZhj/TArp9mhRgdyzIHnPH37o14gM+6P X-Gm-Message-State: AOJu0YwzbrBZKu1GCSFo6iDi5wb2KSQVPQDxlJl4jXysn/QVXabQRD4c YD50DUuwhGgGihMPO850VyNlVTnvNjl0JsUMaIlLt/XBQ+YWPn/+MGOCKoncdv4= X-Google-Smtp-Source: AGHT+IH5HuyWqm0xlysU+IQkoWroaRhheIPJ9ojT9MNnUnqo/Xdu38e9HBXnOtzD4O+1giys97jgbA== X-Received: by 2002:a05:6512:3b82:b0:52c:fd49:d42 with SMTP id 2adb3069b0e04-52eb9990d58mr3224222e87.14.1720604377061; Wed, 10 Jul 2024 02:39:37 -0700 (PDT) Received: from localhost ([149.71.16.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4266f74159csm73618475e9.42.2024.07.10.02.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 02:39:36 -0700 (PDT) From: Punit Agrawal To: paul.walmsley@sifive.com, palmer@dabbelt.com Cc: punit.agrawal@bytedance.com, sunilvl@ventanamicro.com, jesse@rivosinc.com, jrtc27@jrtc27.com, corbet@lwn.net, aou@eecs.berkeley.edu, cleger@rivosinc.com, evan@rivosinc.com, conor.dooley@microchip.com, costa.shul@redhat.com, andy.chiu@sifive.com, samitolvanen@google.com, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel , Yunhui Cui , Palmer Dabbelt Subject: Re: [PATCH v4] RISC-V: Provide the frequency of time CSR via hwprobe In-Reply-To: <20240702033731.71955-2-cuiyunhui@bytedance.com> (Yunhui Cui's message of "Tue, 2 Jul 2024 11:37:31 +0800") References: <20240702033731.71955-1-cuiyunhui@bytedance.com> <20240702033731.71955-2-cuiyunhui@bytedance.com> Date: Wed, 10 Jul 2024 10:39:35 +0100 Message-ID: <87jzhtmvqg.fsf@bytedance.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, Yunhui Cui writes: > From: Palmer Dabbelt > > The RISC-V architecture makes a real time counter CSR (via RDTIME > instruction) available for applications in U-mode but there is no > architected mechanism for an application to discover the frequency > the counter is running at. Some applications (e.g., DPDK) use the > time counter for basic performance analysis as well as fine grained > time-keeping. > > Add support to the hwprobe system call to export the time CSR > frequency to code running in U-mode. > > Signed-off-by: Palmer Dabbelt > Signed-off-by: Yunhui Cui > Reviewed-by: Evan Green > Reviewed-by: Anup Patel > Acked-by: Punit Agrawal > --- > Documentation/arch/riscv/hwprobe.rst | 2 ++ > arch/riscv/include/asm/hwprobe.h | 2 +- > arch/riscv/include/uapi/asm/hwprobe.h | 1 + > arch/riscv/kernel/sys_hwprobe.c | 5 +++++ > 4 files changed, 9 insertions(+), 1 deletion(-) The commit looks ready to be merged. Will this picked up for the 6.11 release? Once this is merged, we can send out the DPDK change relying on the newly added key. Thanks, Punit [...] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DD17C3DA42 for ; Wed, 10 Jul 2024 09:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ds0X4/3UThsVj992Y/CF8bmxks2etKf2vnaD0LChhNs=; b=sS+TLBYaBbFQLw RRMps1ynmOUORWIVLkLJOy+xDs+7cn6o0/ayyiGgUrGNJk+3SmP3AJrOZ6eIbY3Ue6imL5w/m6smk /lmN5KHU/4hJnyTqNqm8gILwxiH4ro8xH49OmsQ3C9ZjHwcFWrinh0RJ7cN5L+6YQWz81DXYS9fEh z2I0Ua17hDC3lnmceeMFJYHkC8TrLndcSf2+tRDtTsKkf4Y2OgyfPNY4Tchf1MaZaKarxJP/5G579 Lplf7rXlMw7e2kxtxWGTqgZGagdm/Iry/nxrV6q60gDdQEc06SoRuFCOguaZ/LFr4ObAe3D5xcHTF 2V5+nCZ1Ya3fRGgjopIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRTnf-0000000A5gT-20X6; Wed, 10 Jul 2024 09:39:47 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRTnc-0000000A5fa-2kyv for linux-riscv@lists.infradead.org; Wed, 10 Jul 2024 09:39:46 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52eafec1e84so3765977e87.0 for ; Wed, 10 Jul 2024 02:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1720604377; x=1721209177; darn=lists.infradead.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ARVuzbVHjxxG9dv9mtR/lCDpdt7FDrvxjkqdsUuuHF8=; b=VACIDoe2ZOgFPIWgRR/3Ltbm6ZqU4fJD+HVoVdRHkh1uwP3ldCxItEoLfUCYsA1x82 WAtVqW+oU2/oGT7ve3+VhCc71vQUyhBbxWG8KUAbZot1JIT8kvEiqEUUqXWasxshhHby E15hodV6fCxa7XalNFTBycJiWFyWmdZLBOyeq3qyz2hErWIJZoOS8k9u7x9SO9vgEi0P wtaoJ8d3YWEfEeuoFHxLEVp5UDD/6RXP8q0nKBMRKPDFV/rdeIvNGmtlfUI6404Jg2Vj 5hDBsNMa3qtQtj0Lr1d1lM5Fga4mEIJYxhG5fbI18W7b7VUHiNIEM6hxPKuQ7vT7tkLA NGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720604377; x=1721209177; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ARVuzbVHjxxG9dv9mtR/lCDpdt7FDrvxjkqdsUuuHF8=; b=EfcnUSVzVFlRazwzfpMY22zbxzAoxZnTVOs41cWsRJ1scd+KPe6iFkZ2V8SNjVu4lt 7exigbtVbimB9C5R8Zwv0YKdFhOuHWP8QI/sNXV54fM73GY7aUzvK60T/+L4lFTmaOu/ WSYu9HMU255azedpgyBRn/aEhu9hqn4R41RCKUQGoW9fwyrUt8pSi5T4nuSUyMhfsQEA uFlACRw2CInbnAllkTz3yeyo74rBd7kO00M1Ct+NM8kKSqtNdP4ghpcM/D18pMndajCD t8HJ2V49Dzdey3HAHh9C6lt+HweIlF7VQnRERbLhnQO+AZ9i1/Nxs0WWwCp60ySI29/f Gb2g== X-Forwarded-Encrypted: i=1; AJvYcCXsKXxEQMnNgsS/FcDhGD18ApGzNz9vLivtC1+qrRP/ofCtdboKykwCkkyaUHXerXMIj3ABTHUYtoI2ENK7Oo3oInINXQ6oHRIV3i9016sW X-Gm-Message-State: AOJu0YxjF37dylYYi9xijQrWrD/Suf2KD6wVb7h/n5UrFuC3hzJOEG2o MmDzh79qn2SjUEAiE+4qE/ssJrk8pvnbMTdE0fo50261phKIzTXEkTrDL1cWiWs= X-Google-Smtp-Source: AGHT+IH5HuyWqm0xlysU+IQkoWroaRhheIPJ9ojT9MNnUnqo/Xdu38e9HBXnOtzD4O+1giys97jgbA== X-Received: by 2002:a05:6512:3b82:b0:52c:fd49:d42 with SMTP id 2adb3069b0e04-52eb9990d58mr3224222e87.14.1720604377061; Wed, 10 Jul 2024 02:39:37 -0700 (PDT) Received: from localhost ([149.71.16.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4266f74159csm73618475e9.42.2024.07.10.02.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 02:39:36 -0700 (PDT) From: Punit Agrawal To: paul.walmsley@sifive.com, palmer@dabbelt.com Subject: Re: [PATCH v4] RISC-V: Provide the frequency of time CSR via hwprobe In-Reply-To: <20240702033731.71955-2-cuiyunhui@bytedance.com> (Yunhui Cui's message of "Tue, 2 Jul 2024 11:37:31 +0800") References: <20240702033731.71955-1-cuiyunhui@bytedance.com> <20240702033731.71955-2-cuiyunhui@bytedance.com> Date: Wed, 10 Jul 2024 10:39:35 +0100 Message-ID: <87jzhtmvqg.fsf@bytedance.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240710_023944_724750_40FE33C7 X-CRM114-Status: GOOD ( 14.59 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: costa.shul@redhat.com, Palmer Dabbelt , aou@eecs.berkeley.edu, samitolvanen@google.com, corbet@lwn.net, Anup Patel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, jesse@rivosinc.com, conor.dooley@microchip.com, Yunhui Cui , andy.chiu@sifive.com, punit.agrawal@bytedance.com, cleger@rivosinc.com, linux-riscv@lists.infradead.org, jrtc27@jrtc27.com, evan@rivosinc.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi, Yunhui Cui writes: > From: Palmer Dabbelt > > The RISC-V architecture makes a real time counter CSR (via RDTIME > instruction) available for applications in U-mode but there is no > architected mechanism for an application to discover the frequency > the counter is running at. Some applications (e.g., DPDK) use the > time counter for basic performance analysis as well as fine grained > time-keeping. > > Add support to the hwprobe system call to export the time CSR > frequency to code running in U-mode. > > Signed-off-by: Palmer Dabbelt > Signed-off-by: Yunhui Cui > Reviewed-by: Evan Green > Reviewed-by: Anup Patel > Acked-by: Punit Agrawal > --- > Documentation/arch/riscv/hwprobe.rst | 2 ++ > arch/riscv/include/asm/hwprobe.h | 2 +- > arch/riscv/include/uapi/asm/hwprobe.h | 1 + > arch/riscv/kernel/sys_hwprobe.c | 5 +++++ > 4 files changed, 9 insertions(+), 1 deletion(-) The commit looks ready to be merged. Will this picked up for the 6.11 release? Once this is merged, we can send out the DPDK change relying on the newly added key. Thanks, Punit [...] _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv