From: Sinan Kaya <okaya@codeaurora.org>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Timur Tabi <timur@codeaurora.org>,
Netdev <netdev@vger.kernel.org>,
sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs
Date: Wed, 14 Mar 2018 18:57:40 -0400 [thread overview]
Message-ID: <d565406d-1bc7-6fb0-3f36-87a28ac69070@codeaurora.org> (raw)
In-Reply-To: <CAKgT0UcriMiyV0q6y_x9r3-HJRAWp5_CpsK2jTqh3qvOV=Kkzw@mail.gmail.com>
Hi Alexander,
On 3/14/2018 5:49 PM, Alexander Duyck wrote:
> On Wed, Mar 14, 2018 at 5:13 AM, <okaya@codeaurora.org> wrote:
>> On 2018-03-14 01:08, Timur Tabi wrote:
>>>
>>> On 3/13/18 10:20 PM, Sinan Kaya wrote:
> Actually I would argue this whole patch set is pointless. For starters
> why is it we are only updating the Intel Ethernet drivers here?
I did a regex search for wmb() followed by writel() in each drivers directory.
I scrubbed the ones I care about and posted this series. Note also that
I have one Infiniband patch in the series.
I considered "ease of change", "popular usage" and "performance critical
path" as the determining criteria for my filtering.
> This
> seems like something that is going to impact the whole kernel tree
> since many of us have been writing drivers for some time assuming x86
> style behavior.
That's true. We used relaxed API heavily on ARM for a long time but
it did not exist on other architectures. For this reason, relaxed
architectures have been paying double penalty in order to use the common
drivers.
Now that relaxed API is present on all architectures, we can go and scrub
all drivers to see what needs to change and what can remain.
>
> It doesn't make sense to be optimizing the drivers for one subset of
> architectures. The scope of the work needed to update the drivers for
> this would be ridiculous. Also I don't see how this could be expected
> to work on any other architecture when we pretty much need to have a
> wmb() before calling the writel on x86 to deal with accesses between
> coherent and non-coherent memory. It seems to me more like somebody
> added what they considered to be an optimization somewhere that is a
> workaround for a poorly written driver. Either that or the barrier is
> serving a different purpose then the one we were using.
Is there a semantic problem with the definition of wmb() vs. writel() vs.
writel_relaxed()? I thought everything is well described in barriers
document about what to expect from these APIs.
AFAIK, writel() is equal to writel_relaxed() on x86 architecture.
It doesn't really change anything for x86 but it saves barriers on
other architectures.
>
> It would make more sense to put in the effort making writel and
> writel_relaxed consistent between architectures before we go through
> and start modifying driver code to support different architectures.
>
Is there an arch problem that I'm not seeing?
Sinan
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2018-03-14 22:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 3:20 [PATCH 1/7] i40e/i40evf: Eliminate " Sinan Kaya
2018-03-14 3:20 ` [PATCH 2/7] ixgbe: eliminate " Sinan Kaya
2018-03-15 1:47 ` Alexander Duyck
2018-03-14 3:20 ` [PATCH 3/7] RDMA/qedr: " Sinan Kaya
2018-03-14 4:12 ` Jason Gunthorpe
2018-03-14 12:06 ` okaya
2018-03-15 22:23 ` Jason Gunthorpe
2018-03-14 3:20 ` [PATCH 4/7] igbvf: " Sinan Kaya
2018-03-15 1:48 ` Alexander Duyck
2018-03-14 3:20 ` [PATCH 5/7] igb: " Sinan Kaya
2018-03-15 1:50 ` Alexander Duyck
2018-03-14 3:20 ` [PATCH 6/7] e1000: " Sinan Kaya
2018-03-15 1:41 ` Alexander Duyck
2018-03-15 23:30 ` Sinan Kaya
2018-03-16 0:25 ` Alexander Duyck
2018-03-16 0:50 ` Sinan Kaya
2018-03-14 3:20 ` [PATCH 7/7] ixgbevf: " Sinan Kaya
2018-03-14 5:08 ` Timur Tabi
2018-03-14 12:13 ` okaya
2018-03-14 21:49 ` Alexander Duyck
2018-03-14 22:57 ` Sinan Kaya [this message]
2018-03-15 1:44 ` Alexander Duyck
2018-03-15 2:17 ` Sinan Kaya
2018-03-15 14:32 ` Alexander Duyck
2018-03-15 16:21 ` Sinan Kaya
2018-03-15 16:27 ` Sinan Kaya
2018-03-15 16:58 ` Alexander Duyck
2018-03-15 1:45 ` Alexander Duyck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d565406d-1bc7-6fb0-3f36-87a28ac69070@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=alexander.duyck@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sulrich@codeaurora.org \
--cc=timur@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome