linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dma_alloc_coherent fragmentation
@ 2009-03-18 13:03 Kamat, Nishant
  2009-03-18 19:24 ` Russell King - ARM Linux
  2009-03-19  6:42 ` Hiroshi DOYU
  0 siblings, 2 replies; 13+ messages in thread
From: Kamat, Nishant @ 2009-03-18 13:03 UTC (permalink / raw)
  To: linux-arm-kernel, Menon, Nishanth
  Cc: linux-omap, Ramirez Luna, Omar, Kanigeri, Hari, Guzman Lugo,
	Fernando, Kevin Hilman, 2ameya

Forwarding on behalf of Nishanth Menon:

-----Original Message-----
From: Menon, Nishanth 
Sent: Tuesday, March 17, 2009 8:17 AM
To: 'linux-arm-kernel@lists.arm.linux.org.uk'
Cc: Gupta, Ramesh; Kevin Hilman; linux-omap@vger.kernel.org; Ramirez Luna, Omar; Kanigeri, Hari; Ameya Palande; Guzman Lugo, Fernando; Ameya Palande
Subject: dma_alloc_coherent fragmentation

Looping in linux-arm ML:

Discussion Ref: [1](linux-omap mailing list)
While working with Linux OMAP kernel[2] we found that on allocating 4 meg chunks using dma_alloc_coherent and de-allocating with dma_free_coherent in a loop using a test driver[7], the memory is getting fragmented as shown by Ameya's observation [3] finally resulting in dump_stack due to lack of pages.

Searching through previous archives, found [4] which seem to imply that allocating chunks greater than 1 page could cause fragmentation.

I wonder why we see this even if we allocate and free the memory in sequence as in [5]. This seems to happen on 2.6.28 and 2.6.29 but not on the 2.6.27 based kernel[6].

Regards,
Nishanth Menon

Ref:
[1] http://marc.info/?t=123719779100002&r=1&w=2
[2] http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git
[3] http://marc.info/?l=linux-omap&m=123722460022336&w=2
[4] http://lkml.indiana.edu/hypermail/linux/kernel/0706.0/0370.html 
[5] http://marc.info/?l=linux-omap&m=123719772811746&w=2
[6] http://git.omapzoom.com/?p=repo/omapkernel.git;
[7] http://marc.info/?l=linux-omap&m=123719772811746&q=p3 

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Bridge issue #3! dma_alloc_coherent causing crash - pm branch
@ 2009-03-13 15:59 Kevin Hilman
  2009-03-14  4:26 ` Gupta, Ramesh
  0 siblings, 1 reply; 13+ messages in thread
From: Kevin Hilman @ 2009-03-13 15:59 UTC (permalink / raw)
  To: Gupta, Ramesh; +Cc: Menon, Nishanth, linux-omap

"Gupta, Ramesh" <grgupta@ti.com> writes:

[...]

>> > Sounds like a memory leak in the bridge driver to me.  I 
>> suggest you 
>> > enable memory leak debugging.  In Kconfig
>> > 
>> >    Kernel Hacking -->  Kernel debugging
>> > 
>> > Enable 'Debug slab memory allocations' and its child 'Memory leak 
>> > debugging'.
>> > 
>> > Or, you could switch to the SLUB allocator which has some more 
>> > flexible debug options which can be controlled at boot-time 
>> from the cmdline.
>> > 
>> > While you are in the Kernel debugging menu, make sure you enable 
>> > 'Verbose BUG()' and 'Verbose kernel errors'.  This will ensure that 
>> > any memory leaks will be dumped with some extra debug output.
>
> I enabled all the above options, do I need to add some boot options to enable 
> Debug messages? I am not seeing any debug information displayed in the cosole by default.
> Looks like I am mising some thing :( . Any comments?
>

You'll only see extra messages when the kerel hits a BUG() or a WARN().  If
you don't see anything more verbose with all these options enabled, then
the kernel is not detecting any problems.

Kevin

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-04-22 10:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18 13:03 dma_alloc_coherent fragmentation Kamat, Nishant
2009-03-18 19:24 ` Russell King - ARM Linux
2009-03-18 20:08   ` Menon, Nishanth
2009-03-19  6:42 ` Hiroshi DOYU
2009-03-19  9:06   ` Menon, Nishanth
2009-04-22  7:46     ` pramod gurav
2009-04-22  7:50       ` Shilimkar, Santosh
2009-04-22  8:23         ` pramod gurav
2009-04-22  8:51           ` Shilimkar, Santosh
2009-04-22  9:14       ` Gupta, Ramesh
2009-04-22  9:44         ` pramod gurav
2009-04-22 10:09           ` Shilimkar, Santosh
  -- strict thread matches above, loose matches on Subject: below --
2009-03-13 15:59 Bridge issue #3! dma_alloc_coherent causing crash - pm branch Kevin Hilman
2009-03-14  4:26 ` Gupta, Ramesh
2009-03-16  9:54   ` dma_alloc_coherent bug? Menon, Nishanth
2009-03-16 17:29     ` Ameya Palande
2009-03-16 19:09       ` Menon, Nishanth
2009-03-17  6:16         ` dma_alloc_coherent fragmentation Menon, Nishanth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).