From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by dpdk.org (Postfix) with ESMTP id 356762661 for ; Mon, 11 Dec 2017 07:24:02 +0100 (CET) Received: by mail-it0-f65.google.com with SMTP id d137so13261501itc.2 for ; Sun, 10 Dec 2017 22:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=q6GJyZVYw/HN8kI4tL9w4wiF0fJI8POsRLpxyBnnzUk=; b=jRUV3n1gjxKz2HgZNd73WPDM9Rj3vdykotjy/aNIGRc5tPQPZIHwnX54kgxifjpoI5 cQPKmqYlyu4mw3PRkykb34ARkKd1R033kWXN4DQDpyUygs3tvpB3IsyrETi0r/BV0LVI TJJxM6NqdUfdn2MCv0/al7vRKFcB+w9d4k1/TQVKq3V67rL7eJSoSfRyjTGletyd4xed BV2M6kWyR5Ew9z6KbuHBkUFJctOfzwq8Qm0b3xtC8XPj6zo7FiJ1T1VK0KKmQuOcKbmU BPkbQ1zwO+4kLiATunOtGGq2X2lbFxxz+uAcYnXwQjeJHCft3zWMoSszumyiVy1ZauqV VnWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=q6GJyZVYw/HN8kI4tL9w4wiF0fJI8POsRLpxyBnnzUk=; b=ssiUQY31WNcINsNN7RM0bOMMcMQQBCyiWDikj8SYYhE8lIA0e0BGlwwKm3+gCve/FN I4pU7lBsuk8godBmG4hyTGAGvNxrs1afbWglVjw0m7irt6rmwrub5E1XG0ljfAmDvO3N IuAQtxwv1HaIB9KzRSxMMGh/0hBIWzvxk7nOITSfsduKZjt5US3RXPFCCY3QyjdVVcBA okM8wC/hYdRylrTVA1oeNPFgaQNsmF5PS6dZiP4DOwrCvbJVLi24XTZEnsgJ9S28xYaB J0D/HuuzC0JPUne5ipwwcizQ7q/9zs7Dt8Who/wbo9NFnDqSAb2NSVJfCWS4ThEZ0FNH x59Q== X-Gm-Message-State: AKGB3mIIwIxB+yeUhnDcm37YkaR6RiImw/xd0LHK+wJk2RCNOKtabFZS VonO5Oto+52s9pevsLAzK0+2lU1T X-Google-Smtp-Source: AGs4zMbW/jBCx4kLmMubeXVKDT9Aa/4mBn2hGfQY57ee9HU6+L58Sfi7UG2sIGEFdXRUtkKkkXbURg== X-Received: by 10.36.125.75 with SMTP id b72mr16360493itc.16.1512973441357; Sun, 10 Dec 2017 22:24:01 -0800 (PST) Received: from [0.0.0.0] (67.209.179.165.16clouds.com. [67.209.179.165]) by smtp.gmail.com with ESMTPSA id l63sm89333ita.44.2017.12.10.22.23.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Dec 2017 22:24:00 -0800 (PST) To: Jerin Jacob Cc: "dev@dpdk.org" References: <676baa87-777b-ca6e-41c9-7233f90740b6@gmail.com> <20171211055930.GA15672@jerin> From: Jia He Message-ID: Date: Mon, 11 Dec 2017 14:23:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171211055930.GA15672@jerin> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] About pmu cycle counter usage in armv8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 06:24:02 -0000 Hi Jerin Ok And I wonder why you haven't met such problem (all rd_tsc() is 0)in your test platform? Did you use an old kernel (older than v4.5-rc1)? root@aw-host:~/linux# git describe da4e4f18afe0 v4.5-rc1-8-gda4e4f1 Maybe you need to give a warning that, the usage of High-resolution cycle counter is not correct if the kernel version is newer than v4.5-rc1-8-gda4e4f1? Cheers, Jia On 12/11/2017 1:59 PM, Jerin Jacob Wrote: > -----Original Message----- >> Date: Mon, 11 Dec 2017 13:38:25 +0800 >> From: Jia He >> To: Jerin Jacob , "dev@dpdk.org" >> >> Subject: About pmu cycle counter usage in armv8 >> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 >> Thunderbird/52.5.0 >> >> Hi Jerin >> >> In [1], I met a pmu cycle counter problem (all return value is 0) >> occasionally. >> >> And then I submited a patch to kernel maillist, but was rejected by >> maintainer at last [2]. >> >> He said: >> >> "We only intend for the in-kernel perf infrastructure to access >> >> pmccntr_el0; nothing else should touch it." > Yes. That's the reason why > 1) A warning added in documentation. > http://dpdk.org/doc/guides/prog_guide/profile_app.html > See at last > " > The PMU based scheme is useful for high accuracy performance profiling > with rte_rdtsc(). However, this method can not be used in conjunction > with Linux userspace profiling tools like perf as this scheme alters the > PMU registers state. > " > 2) By default it is disabled and not need for production systems. > Needed only for performance debugging. > >> So maybe it is not proper for dpdk to use pmu cycle counter? > But, There is no alternative in arm64 to get high resolution counter in > user space(in performance effective way) > >> [1] http://dpdk.org/ml/archives/dev/2017-November/080998.html >> >> [2]https://lkml.org/lkml/2017/11/16/22 >> >> -- >> Cheers, >> Jia >>