* [PATCH 1/1] DSPBRIDGE: Set __GFP_RECLAIMABLE for reloading bridge module
@ 2009-03-19 9:37 Hiroshi DOYU
2009-03-19 12:34 ` Menon, Nishanth
0 siblings, 1 reply; 2+ messages in thread
From: Hiroshi DOYU @ 2009-03-19 9:37 UTC (permalink / raw)
To: h-kanigeri2
Cc: x0095840, ameya.palande, nm, grgupta, linux-omap, Hiroshi DOYU
To restart DSP system after DSP crash, reloading bridge module is
necessary and a high order page allocation may fail after long use
time because of memory fragmentation. To avoid this, mark it as
reclaimable for immediate reloading.
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
drivers/dsp/bridge/services/mem.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c
index 0a10304..3661fb1 100644
--- a/drivers/dsp/bridge/services/mem.c
+++ b/drivers/dsp/bridge/services/mem.c
@@ -357,9 +357,14 @@ void *MEM_AllocPhysMem(u32 cBytes, u32 ulAlign, OUT u32 *pPhysicalAddress)
if (extPhysMemPoolEnabled) {
pVaMem = MEM_ExtPhysMemAlloc(cBytes, ulAlign,
(u32 *)&paMem);
- } else
- pVaMem = dma_alloc_coherent(NULL, cBytes, &paMem,
- (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL);
+ } else {
+ gfp_t gfp = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL;
+
+ /* To ensure allocation at immediate reloading */
+ gfp |= __GFP_RECLAIMABLE;
+
+ pVaMem = dma_alloc_coherent(NULL, cBytes, &paMem, gfp);
+ }
if (pVaMem == NULL) {
*pPhysicalAddress = 0;
GT_1trace(MEM_debugMask, GT_6CLASS,
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH 1/1] DSPBRIDGE: Set __GFP_RECLAIMABLE for reloading bridge module
2009-03-19 9:37 [PATCH 1/1] DSPBRIDGE: Set __GFP_RECLAIMABLE for reloading bridge module Hiroshi DOYU
@ 2009-03-19 12:34 ` Menon, Nishanth
0 siblings, 0 replies; 2+ messages in thread
From: Menon, Nishanth @ 2009-03-19 12:34 UTC (permalink / raw)
To: Hiroshi DOYU, Kanigeri, Hari
Cc: Guzman Lugo, Fernando, ameya.palande, Gupta, Ramesh, linux-omap
> -----Original Message-----
> From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
> Sent: Thursday, March 19, 2009 11:38 AM
> To: Kanigeri, Hari
> Cc: Guzman Lugo, Fernando; ameya.palande@nokia.com; Menon, Nishanth;
> Gupta, Ramesh; linux-omap@vger.kernel.org; Hiroshi DOYU
> Subject: [PATCH 1/1] DSPBRIDGE: Set __GFP_RECLAIMABLE for reloading bridge
> module
>
> To restart DSP system after DSP crash, reloading bridge module is
> necessary and a high order page allocation may fail after long use
> time because of memory fragmentation. To avoid this, mark it as
> reclaimable for immediate reloading.
>
> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Thanks Hiroshi.
Tested-by: Nishanth Menon <nm@ti.com>
Test h/w: SDP3430. - OMAP3430 ES3.0
Test iteration:
insmod ./bridgedriver.ko shm_size=0x400000 phys_mempool_base=0 base_img=/lib/dsp/baseimage.dof
rmmod bridgedriver
--
Num iterations: 25K
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-19 12:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-19 9:37 [PATCH 1/1] DSPBRIDGE: Set __GFP_RECLAIMABLE for reloading bridge module Hiroshi DOYU
2009-03-19 12:34 ` 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).