Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jul 2015 10:55:34 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Daisuke Aoyama <aoyama@peach.ne.jp>, Andreas Andersson <aandersson@tappsi.co>, freebsd-arm@freebsd.org
Subject:   Re: Performance issues with raspberry pi 2
Message-ID:  <1436979334.1334.345.camel@freebsd.org>
In-Reply-To: <55A6830B.2050505@selasky.org>
References:  <CAOx9_ZiUw5nkBK=Bsumb=K2W1hv0P%2BNAwT7OXE7VAz_96awqOw@mail.gmail.com> <3AB5ECCF20894591B4DF5FCBA8CA49BB@ad.peach.ne.jp> <CAOx9_Zg5WGUAvmmhAkUsgUM-H%2Bp9MWzmWjHnXfKAAxFoEuwrLg@mail.gmail.com> <CAOx9_ZiZmmrSBkf1quzW-zkbW0nNg08rAAV__7FHRdCbTCzt-g@mail.gmail.com> <B74C9AF8E1FD4AA596BBF09292FE52B4@ad.peach.ne.jp> <2D17B16DBC5F452D8DAC721E17BBF1B7@ad.peach.ne.jp> <55A6830B.2050505@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2015-07-15 at 17:58 +0200, Hans Petter Selasky wrote:
> On 05/18/15 00:02, Daisuke Aoyama wrote:
> >
> > Previous subset does not work correctly in ratecheck.
> > I don't know a reason but same code from ODROID-C1 version works.
> > I re-create the patch as dwc_otg-rpi2-20150518.patch.
> >
> > http://www.peach.ne.jp/archives/rpi/patch/dwc_otg-rpi2-20150518.patch
> 
> Hi,
> 
> I've finally had time to look at your patch, and it has some clever new 
> ideas to optimise the DWC OTG performance. I like it and will do some 
> work to integrate your patches like promised this week. It might be too 
> late for the coming 10.x release, but will for sure hit 10-stable when 
> the next 10.x is out. Thank you!
> 
> One question though: Are the WMB's and RMB's strictly needed? Isn't the 
> I/O memory mapped coherently?
> 
> Did you consider enabling the TXFIFOEMPTY IRQs instead of spinning?

I've been saying for years that you cannot assume that COHERENT means
"no sync operations needed", and that's more true than ever with armv6.

It is especially true of DEVICE mappings for arm memory-mapped IO: the
region is uncached and inelligible for write-combining, but write access
is still buffered (and dmb()/dsb() is insufficient to ensure that the
write buffers are flushed on all hardware; bus_space_barrier() does the
right thing).

Using inline barriers like that in bus_space IO code isn't right though;
that's what bus_space_barrier() is for.  Doing the barriers on every
bus_space access is probably overkill; typically when you need barriers
it's in a few specific places after a group of reads or writes, and
especially at places like the exit border in interrupt handling, or the
interlock points if interrupt handlers and non-interrupt code share
access to hardware registers.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1436979334.1334.345.camel>