From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9BFDA0563; Tue, 10 Mar 2020 08:53:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DABF91C011; Tue, 10 Mar 2020 08:53:33 +0100 (CET) Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by dpdk.org (Postfix) with ESMTP id A78D71C00E for ; Tue, 10 Mar 2020 08:53:32 +0100 (CET) Received: by mail-il1-f195.google.com with SMTP id l14so5293264ilj.8 for ; Tue, 10 Mar 2020 00:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DCt53o7TKezGWwSCbjJpjax9T+A/p8NGKVRe9hhRWMU=; b=NIbp/XqXLxP5LJ/Ji1nk6JbisK1mPn9eQpxqvnw4/ir5/Cg45YQ26rZsxvWTHif6dH ic7re6jorwiSfLimidxtV/4bvD4qd7i4E9PyznVtoRa1pFV+KS9EomYasRil9IRSbvIX ySG9VWn/ywkGt552tyM4JeIYcQGtwv8ipYe4WxarRM07mU9Y42vsrxIR/mZFLyLRUGh9 AdISeGO2M95fcgZZfgCyaBcHBHrZNbolHWa2/k/kHnHORCgKtJ/5BdJKXoZCOTcMeYhY 2M4HXQnJerLwlg6djl9AmFEmlOQ03EE4FgPPh+b2dDTlvTY6fDVIDkEnudmUNEdXw1FY GC6Q== 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:content-transfer-encoding; bh=DCt53o7TKezGWwSCbjJpjax9T+A/p8NGKVRe9hhRWMU=; b=VNdF1Jk+7VXs04OfQj4hWbICj1YEYso+hBz6RGjJC2qdN1ePNQB+4psWgsG8B4h+pb n2eQjkuKOXINEGCcnqb3re6tLs1F0Stu7SEhMOKM2o+6eXgvYgXQSI/7RtpCgH9JR1NW GtKsEdZ63zYD8Jvvo+k0Lk/KtHgHma+QvQCLXp/3byJvlHCXf4Xe6KpGgRADKUonNRH7 W48NGydozEvA4SQog9yCVbgqSHXq3oEJVzMCRpEG19z9o0vU72HjKVWbAfcHssTrwLA6 3zqZJjyPKnjw0pw7PrFdYiG4DC2iEgFWnbn+PIG3hjh3w23dlg599iAvAlsFlUOoZJPE 0ZkA== X-Gm-Message-State: ANhLgQ1EwgFAKdMnqe41JVmKdFmmwR9lXor0tp1Uf1WJEibEXZKt7qX0 i2BBHC6DzVEvo4nkV2IsrRg025uQ8Mv2s8Wi8QBO7Q== X-Google-Smtp-Source: ADFU+vt7MamGdIF/n5RXSepcyTpxayVAxIFyW6yUPhPZ4zMGlo3L4mqwvm7m1IWzW1JFKZEr+OdZf5VQd0pMVY4xEhQ= X-Received: by 2002:a92:1906:: with SMTP id 6mr19749740ilz.130.1583826811898; Tue, 10 Mar 2020 00:53:31 -0700 (PDT) MIME-Version: 1.0 References: <4099DE2E54AFAD489356C6C9161D53339729EB7E@DGGEML502-MBX.china.huawei.com> <4099DE2E54AFAD489356C6C9161D53339729F32B@DGGEML502-MBX.china.huawei.com> In-Reply-To: <4099DE2E54AFAD489356C6C9161D53339729F32B@DGGEML502-MBX.china.huawei.com> From: Jerin Jacob Date: Tue, 10 Mar 2020 13:23:15 +0530 Message-ID: To: Linhaifeng Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "Lilijun (Jerry)" , chenchanghu , xudingke Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] cycles: add isb before read cntvct_el0 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Mar 10, 2020 at 8:09 AM Linhaifeng wrote: > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Jerin Jacob [mailto:jerinjacobk@gmail.com] > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B43=E6=9C=889=E6=97=A5 2= 3:43 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Linhaifeng > =E6=8A=84=E9=80=81: dev@dpdk.org; thomas@monjalon.net; Lilijun (Jerry) ; chenchanghu ; xudingke > =E4=B8=BB=E9=A2=98: Re: [dpdk-dev] [PATCH] cycles: add isb before read cn= tvct_el0 > > On Mon, Mar 9, 2020 at 2:43 PM Linhaifeng wrote: > > > > We nead isb rather than dsb to sync system counter to cntvct_el0. > > # Currently rte_rdtsc() does not have dsb. Right? or any barriers. > # Why do you need it? If it regarding, getting accurate value then use rt= e_rdtsc_precise(). > > We use rte_get_tsc_cycles get start_value in pmd1 and end_value in pmd2 i= n our qos module, it works ok in x86 but not ok in arm64. > > Then we use rte_mb() to sync instruction but it not work.Because rte_mb i= s dsb I think it only have affect on memory. cntvct_el0 and system counter = is register so I think we should use isb. > > It works well after we use isb in multi core scenes. > > Use rte_rdtsc_precise is good idea. Maybe use isb replace of rte_mb(dsb) = ? Yes. Please. > > > > > Signed-off-by: Haifeng Lin