RE: dma_alloc_coherent fragmentation

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

 



Hi Hiroshi,
> -----Original Message-----
> From: Hiroshi DOYU [mailto:Hiroshi.DOYU@xxxxxxxxx]
> Sent: Thursday, March 19, 2009 8:43 AM

> 
> 
> What would happen with __GFP_RECLAIMABLE for dma_alloc_coherent()?
As per [1], GFP_TEMPORARY might be the right approach.. but yes,
Changing dummy to do:
dma_alloc_coherent(NULL, b[i].size, &b[i].phy, GFP_TEMPORARY);

Seems to resolve the issue with the dummy driver.

The question however still remains: For a driver to allocate a memory which is not temporary in nature we'd recommend GFP_KERNEL. But as part of the exit sequence the driver will deallocate that memory and as part of init sequence, reallocate. Given that the memory is not reclaimed immediately, it looks like the only way to ensure that would be to do GFP_KERNEL | __GFP_RECLAIMABLE (which essentially is the definition of GFP_TEMPORARY).

Regards,
Nishanth Menon
Ref:
[1] http://lkml.indiana.edu/hypermail/linux/kernel/0705.2/0638.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux