Messages in this thread | | | Date | Wed, 9 Jan 2013 08:48:38 +0100 | From | Michael Olbrich <> | Subject | Re: [PATCH v3 2/4] videobuf2-dma-streaming: new videobuf2 memory allocator |
| |
On Tue, Jan 08, 2013 at 07:31:30AM -0700, Jonathan Corbet wrote: > On Tue, 08 Jan 2013 07:50:41 +0100 > Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > > > Couldn't this performance difference be due to the usage of GFP_DMA inside > > > the VB2 code, like Federico's new patch series is proposing? > > > > > > If not, why are there a so large performance penalty? > > > > Nope, this was caused rather by a very poor CPU access to non-cached (aka > > 'coherent') memory and the way the video data has been accessed/read > > with CPU. > > Exactly. Uncached memory *hurts*, especially if you're having to touch it > all with the CPU.
Even worse, on ARMv7 (at least) the cache implements or is necessary for (I'm not an expert here) unaligned access. I've seen applications crash on non-cached memory with a bus error because gcc assumes unaligned access works. And there isn't even a exception handler in the kernel, probably for the same reason.
Michael
-- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
| |