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 F1D84A04DD; Thu, 2 Jan 2020 10:51:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49B4A1BFF3; Thu, 2 Jan 2020 10:51:53 +0100 (CET) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id B9C501BFED for ; Thu, 2 Jan 2020 10:51:51 +0100 (CET) Received: by mail-il1-f194.google.com with SMTP id t8so33697077iln.4 for ; Thu, 02 Jan 2020 01:51:51 -0800 (PST) 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; bh=/WuYytL/Ju/53wlygb2jMKHToVYjdA1vCSVv6M9PhLo=; b=cXkDLH09X5cajwM5kmCXDKb2lPR3FAqwGL/kXPXfpHCED5bVqHV6JLrlQCBs/tI2b0 Wy3oopX1wmVSUF4Y8q3WK7QTzpP7eNRauCGM1+YjITOoZb4KLyCzm87v3Wk0TCEMfHJT im7rTtzlN5deWWFHX5A0w+GbeipyVt8t4cr3UsA8KQTb2OIqeRLxDGepXNcSnc+v4nkz 2RBbpzxghN/wogd6rTIdYWdsKKMPmVjN/bdVs2U0yDGfJ1ehyFHomDGfQMOdNPyakioL v3gjhDYrxEHa6DapOnCdp01c3JNdJPEkNNL9kRHIlxOm2YmLuocwySostX/5WFuZ6uLR USeQ== 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; bh=/WuYytL/Ju/53wlygb2jMKHToVYjdA1vCSVv6M9PhLo=; b=HpfGXyE2ZBOO8pcRox+pvbgbaG62PT7dukhPGAnnciaYn7RluB4YmZNlJcJnFYOYzQ jS2iv1uxfErk16X0ztj4Xu+UVpaJCTdzcHrg6uOcL3rTb7T0FkMvrwCM3G0pSsUfB98k 2TOTaREuSXJTo7FRt1YT+yKFR48ryoAx9gMxPlKsahojD45BRRwl+QDKpiEVF2ocmU+9 Xj/hB3jJYCIULrNrrMe/37lgB4pZ5mb2JJqGCgvIiqvKy4mWjnIAudTEMCY3LbuzUh8K fD3RQ/6SBjb5Vgvo9h15ybTpKJb2A+DQjMnMqAEjTiQHFZifVP1t4Hppt4U+n89oDPYM Uxow== X-Gm-Message-State: APjAAAWDoqAVNGDyVqS3ww1aaPo0+BA7A8joMSf9zC7iXMEjJ4wVcKbW 2BPCvG9voxBL2TwFeRNq7KHTylkBuUm+RGwHIo8= X-Google-Smtp-Source: APXvYqzMN+3ELO8LciZgkWj2JumspX4mkY/Wk/6JU2HM1WOeepEfWTgGbkUoEBKZ6gRYU60AJsoCdpRAa0fmmYejb3E= X-Received: by 2002:a92:5e46:: with SMTP id s67mr70740670ilb.162.1577958710877; Thu, 02 Jan 2020 01:51:50 -0800 (PST) MIME-Version: 1.0 References: <1571758074-16445-1-git-send-email-gavin.hu@arm.com> <1576811391-19131-1-git-send-email-gavin.hu@arm.com> <1576811391-19131-2-git-send-email-gavin.hu@arm.com> In-Reply-To: From: Jerin Jacob Date: Thu, 2 Jan 2020 15:21:35 +0530 Message-ID: To: Gavin Hu Cc: dpdk-dev , nd , David Marchand , "thomas@monjalon.net" , "rasland@mellanox.com" , "maxime.coquelin@redhat.com" , "tiwei.bie@intel.com" , "hemant.agrawal@nxp.com" , "jerinj@marvell.com" , Pavan Nikhilesh , Honnappa Nagarahalli , Ruifeng Wang , Phil Yang , Joyce Kong , Steve Capper Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal/arm64: relax the io barrier for aarch64 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 Mon, Dec 23, 2019 at 3:46 PM Gavin Hu wrote: > > Hi Jerin, > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Monday, December 23, 2019 5:20 PM > > To: Gavin Hu > > Cc: dpdk-dev ; nd ; David Marchand > > ; thomas@monjalon.net; > > rasland@mellanox.com; maxime.coquelin@redhat.com; > > tiwei.bie@intel.com; hemant.agrawal@nxp.com; jerinj@marvell.com; > > Pavan Nikhilesh ; Honnappa Nagarahalli > > ; Ruifeng Wang > > ; Phil Yang ; Joyce Kong > > ; Steve Capper > > Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal/arm64: relax the io barrier for > > aarch64 > > > > On Mon, Dec 23, 2019 at 2:44 PM Gavin Hu wrote: > > > > > > Hi Jerin, > > > > Hi Gavin, > > > > > > > > I think we are on the same page with regard to the problem, and the > > situations, thanks for illuminating the historical background of the two > > barriers. > > > About the solution, I added inline comments. > > > > It will be optimization only when if we are changing in the fast path. > > > > In the slow path, it does not matter. > > > > I think, the First step should be to use rte_cio_* wherever it is > > > > coherent memory used in _fast path_. I think, Almost every driver > > > > fixed that. > > > > > > > > I am not against this patch(changing the slow path to use rte_cio* > > > > from rte_io* and virtio changes associated with that). > > > > If you are taking that patch, pay attention to all the drivers in the > > > > tree which is using rte_io* for mixed access in slowpath. > > > I see 30+ drivers has calling rte_io* directly or indirectly through > > rte_write/read*. > > > It is hard for me to figure out all the mixed accesses in these drivers, and > > as you said, it makes no sense to change the _slow path_. > > > > > > How about we keep the old rte_io as is, and introduce 'fast path' version > > of rte_io for new code use? > > > Then in future, we may merge the two? > > > Another reason about this proposal is maybe there is rte_io calling in the > > fast path, but they are not mixed accesses and rte_cio is not suitable. > > > > Could you share more details about the case where fastpath + rte_io > > needed + rte_cio is not suitable? > > Here is an example for i40e, in the fast path, but only a pure io memory access. > https://code.dpdk.org/dpdk/v19.11/source/drivers/net/i40e/i40e_rxtx.c#L1208 Yes. That's a performance issue. It could be changed to following for the fix that works on x86, arm64 with existing infra. From: I40E_PCI_REG_WRITE() to: rte_cio_wmb() I40E_PCI_REG_WRITE_RELAXED() > > I wanted two variants of rte_io, because also x86 requires two as indicated here, one for no-WC and another for WC. > http://inbox.dpdk.org/dev/20191204151916.12607-1-xiaoyun.li@intel.com/T/#ea8bb1b4a378ab09baedbf95b4542bcb92f4a396f > > > > > > > > Any thoughts? > > > > > > > > > > > > But as the case in i40e, we must pay attention to where rte_cio was > > > > missing but rescued by old rte_io(but not by new rte_io). > > > > > > > > > >