dma_alloc_coherent irqs off too long

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

dma_alloc_coherent irqs off too long

1,416件の閲覧回数
don1097
Contributor I


We are using the IMX6Dual and during startup we are missing characters on one of the Uarts.

We tried using DMA for the Uart and adjusting the receive threshold but no luck.

We noticed that it happens during the insmod of the galcore.ko driver.

Finally ran ftrace for irqsoff and discovered the irqs are off for 1165us and as much as 1700us.

The Uart is running at 230kbaud which translates to 43us/char with a 32 byte fifo.  Overrun occurs at 1419us.

Why is this taking so long?

# tracer: irqsoff

#

  insmod-291     0d..1    0us!: __raw_spin_lock_irqsave

  insmod-291     0d..1 1163us+: _raw_spin_unlock_irqrestore

  insmod-291     0d..1 1165us : trace_hardirqs_on <-_raw_spin_unlock_irqrestore

  insmod-291     0d..1 1166us : <stack trace>

=> __dma_alloc

=> dma_alloc_coherent

=> gckOS_AllocateNonPagedMemory

=> gckOS_AllocateContiguous

=> _Construct

=> gckMMU_Construct

=> gckKERNEL_Construct

=> gckGALDEVICE_Construct

ラベル(7)
0 件の賞賛
返信
1 返信

1,200件の閲覧回数
Yuri
NXP Employee
NXP Employee

Looks like Linux implementation of DMA API to handle coherency between CPUs and external devices
(when accessing the same physical memory) is not intended for real time applications.

0 件の賞賛
返信