Re: [PATCH v2] ioat_alloc_chan_resources should not perform sleeping allocations.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 04, 2017 at 01:22:52AM -0800, Krister Johansen wrote:
> On a kernel with DEBUG_LOCKS, ioat_free_chan_resources triggers an
> in_interrupt() warning.  With PROVE_LOCKING, it reports detecting a
> SOFTIRQ-safe to SOFTIRQ-unsafe lock ordering in the same code path.
> 
> This is because dma_generic_alloc_coherent() checks if the GFP flags
> permit blocking.  It allocates from different subsystems if blocking is
> permitted.  The free path knows how to return the memory to the correct
> allocator.  If GFP_KERNEL is specified then the alloc and free end up
> going through cma_alloc(), which uses mutexes.
> 
> Given that ioat_free_chan_resources() can be called in interrupt
> context, ioat_alloc_chan_resources() must specify GFP_NOWAIT so that the
> allocations do not block and instead use an allocator that uses
> spinlocks.

Applied now, after fixing the subsystem and driver tag.

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux