From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Kirsher Subject: Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs Date: Tue, 27 Mar 2018 09:54:17 -0700 Message-ID: <1522169657.6503.1.camel@intel.com> References: <1521831180-25014-1-git-send-email-okaya@codeaurora.org> <1521849496.15055.16.camel@intel.com> <862cdbeafb9cfd272a426b010943ffc5@codeaurora.org> Reply-To: jeffrey.t.kirsher@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1851031878116948681==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Sinan Kaya Cc: sulrich@codeaurora.org, Netdev , Timur Tabi , Alexander Duyck , intel-wired-lan , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-arm-msm@vger.kernel.org --===============1851031878116948681== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-CuAc+sS1ZFuNW1SFQUyF" --=-CuAc+sS1ZFuNW1SFQUyF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-03-27 at 08:42 -0400, Sinan Kaya wrote: > On 3/23/2018 10:34 PM, okaya@codeaurora.org wrote: > > On 2018-03-23 19:58, Jeff Kirsher wrote: > > > On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: > > > > On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya > > > org> > > > > wrote: > > > > > Code includes wmb() followed by writel() in multiple places. > > > > > writel() > > > > > already has a barrier on some architectures like arm64. > > > > >=20 > > > > > This ends up CPU observing two barriers back to back before > > > > > executing > > > > > the > > > > > register write. > > > > >=20 > > > > > Since code already has an explicit barrier call, changing > > > > > writel() to > > > > > writel_relaxed(). > > > > >=20 > > > > > I did a regex search for wmb() followed by writel() in each > > > > > drivers > > > > > directory. > > > > > I scrubbed the ones I care about in this series. > > > > >=20 > > > > > I considered "ease of change", "popular usage" and > > > > > "performance > > > > > critical > > > > > path" as the determining criteria for my filtering. > > > > >=20 > > > > > 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. > > > > >=20 > > > > > 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. > > > > >=20 > > > > > We start with mostly used ones and hope to increase the > > > > > coverage over > > > > > time. > > > > > It will take a while to cover all drivers. > > > > >=20 > > > > > Feel free to apply patches individually. > > > >=20 > > > > I looked over the set and they seem good. > > > >=20 > > > > Reviewed-by: Alexander Duyck > > >=20 > > > Grrr, patch 1 does not apply cleanly to my next-queue tree (dev- > > > queue > > > branch). I will deal with this series in a day or two, after I > > > have dealt > > > with my driver pull requests. > >=20 > > Sorry, you will have to replace the ones you took from me. >=20 > Double sorry now. >=20 > I don't know if you have been following "RFC on writel and > writel_relaxed" thread > or not but there are some new developments about wmb() requirement.=20 >=20 > Basically, wmb() should never be used before writel() as writel() > seem to > provide coherency and observability guarantee. >=20 > wmb()+writel_relaxed() is slower on some architectures than plain > writel() >=20 > I'll have to rework these patches to have writel() only.=20 >=20 > Are you able to drop the applied ones so that I can post V8 or is it > too late? Currently I do not have any of your patches applied to my next-queue tree (dev-queue branch). So feel free to do any revisions you need to do and to re-submit to intel-wired-lan@lists.osuosl.org (IWL) mailing list. --=-CuAc+sS1ZFuNW1SFQUyF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiTyZWz+nnTrOJ1LZ5W/vlVpL7c4FAlq6dzkACgkQ5W/vlVpL 7c5mwQ//U45gJsYc7XGc+M4stIdKlC6TVUP1tTdOwv906Cw98Dx+po9qbnaVWh2Z +CKx5L5MMwpTFYVHxOGvtvS3rVn4WeJID79Yv7OTl2KZ9ldDSLKv2yWGzmcsUm7s 1JNjHax115MX2KSVfrPW7Dq+5RLX/ivPnGPgEo3V3RDAc+i42ZNROcX+iQl1F+cA EpAvdser4Sm0SMj5n2Ct5IlpV8rPdBy7juUn/Boz7gfsQEfMViTDfS2UAPn4a4Pa bs6z0E25pwtIyS031AAmH4znP0ZoTRgkQW1vOT9Y68Nw07Jxs4gWAShzSq8I0q41 qh5+Q37zpdjNLDgKQScGz48iCJlVmc/R7Yyc8XoqSSh1RnmMlMzhG+PzYzHb1BEY yw9F9xI2xCnol3tARaACoWL08n9rlXB6NB9KtODHH2hsmBudcCcfdBEqXskHETpv +p9xHwz26ZdbYnqySFHZrSorg0Puay7sIIQBD8jc7vbGT9Ay8YjMLIwOyWm6lDvy dr/+WJEUoBT0mnKd6MMbmk33yVRbKUzOcFK8THzQ0UawhO3f1X48GIWhZdDoAHf8 D6qfIC3Wo6o675MemmguI4iTqHdHMtK86/hjVsXyHcjx8PLRUw1jfQkFPHPZVyur jFMqvkMC0Zb5tCAtzR9VKv1hxCCtIYr3EEtbg+NPmT5KRQCByak= =8+Ho -----END PGP SIGNATURE----- --=-CuAc+sS1ZFuNW1SFQUyF-- --===============1851031878116948681== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1851031878116948681==--