Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361922 > unrolled thread

Re: [PATCH v4 6/7] mtd: nand: omap2: Fix high memory dma prefetch transfer

Started byBoris Brezillon <boris.brezillon@free-electrons.com>
First post2016-03-21 16:10 +0100
Last post2016-03-21 16:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v4 6/7] mtd: nand: omap2: Fix high memory dma prefetch  transfer Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-21 16:10 +0100

#1361922 — Re: [PATCH v4 6/7] mtd: nand: omap2: Fix high memory dma prefetch transfer

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2016-03-21 16:10 +0100
SubjectRe: [PATCH v4 6/7] mtd: nand: omap2: Fix high memory dma prefetch transfer
Message-ID<rf9CW-7tl-33@gated-at.bofh.it>
Hi Franklin,

On Thu, 10 Mar 2016 17:56:42 -0600
Franklin S Cooper Jr <fcooper@ti.com> wrote:

> Based on DMA documentation and testing using high memory buffer when
> doing dma transfers can lead to various issues including kernel
> panics.

I guess it all comes from the vmalloced buffer case, which are not
guaranteed to be physically contiguous (one of the DMA requirement,
unless you have an iommu).

> 
> To workaround this simply use cpu copy. The amount of high memory
> buffers used are very uncommon so no noticeable performance hit should
> be seen.

Hm, that's not necessarily true. UBI and UBIFS allocate their buffers
using vmalloc (vmalloced buffers fall in the high_memory region), and
those are likely to be dis-contiguous if you have NANDs with pages > 4k.

I recently posted patches to ease sg_table creation from any kind of
virtual address [1][2]. Can you try them and let me know if it fixes
your problem?

Thanks,

Boris

[1]https://lkml.org/lkml/2016/3/8/276
[2]https://lkml.org/lkml/2016/3/8/277


-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web