Hi, >-----Original Message----- >From: Ameya Palande [mailto:ameya.palande@xxxxxxxxx] >Sent: Wednesday, February 17, 2010 4:55 AM >To: Guzman Lugo, Fernando >Cc: linux-omap@xxxxxxxxxxxxxxx; Doyu Hiroshi (Nokia-D/Helsinki); Contreras >Felipe (Nokia-D/Helsinki) >Subject: Re: [RESEND] [PATCH] DSPBRIDGE: Adding protection Resource cleanup >linked lists > >Hi Fernando, > >On Wed, 2010-02-10 at 09:32 +0100, ext Guzman Lugo, Fernando wrote: >> Please discard previous one. >> >> Regards, >> Fernando. >> >> From 6bcdc02f6265246e385194433775e75db7ad44cf Mon Sep 17 00:00:00 2001 >> From: Fernando Guzman Lugo <x0095840@xxxxxx> >> Date: Wed, 10 Feb 2010 02:31:40 -0600 >> Subject: [PATCH] DSPBRIDGE: Adding protection Resource cleanup linked >lists >> >> This patch protects the Resorce cleanup lists from >> concurrent access >> >> Signed-off-by: Fernando Guzman Lugo <x0095840@xxxxxx> >> --- >> arch/arm/plat-omap/include/dspbridge/drv.h | 3 + >> drivers/dsp/bridge/pmgr/wcd.c | 16 ++++++- >> drivers/dsp/bridge/rmgr/drv.c | 71 >+++++++++++++++++++++++---- >> drivers/dsp/bridge/rmgr/drv_interface.c | 8 ++- >> 4 files changed, 83 insertions(+), 15 deletions(-) >> >> diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat- >omap/include/dspbridge/drv.h >> index b6a5fd2..b044291 100644 >> --- a/arch/arm/plat-omap/include/dspbridge/drv.h >> +++ b/arch/arm/plat-omap/include/dspbridge/drv.h >> @@ -137,15 +137,18 @@ struct PROCESS_CONTEXT{ >> >> /* DSP Node resources */ >> struct NODE_RES_OBJECT *pNodeList; >> + struct mutex node_mutex; >> >> /* DMM resources */ >> struct DMM_RES_OBJECT *pDMMList; >> + struct mutex dmm_mutex; >> >> /* DSP Heap resources */ >> struct DSPHEAP_RES_OBJECT *pDSPHEAPList; >> >> /* Stream resources */ >> struct STRM_RES_OBJECT *pSTRMList; >> + struct mutex strm_mutex; >> } ; > >Is there a specific reason for using mutex instead of spin_lock? > >AFAIU these locks are help for very short time, for inserting / removing >elements from linked list, or traversing a linked list. Yes, changing mutex to spinlocks would help in performance. Let me send a patch to change them. Regards, Fernando. > >Cheers, >Ameya. -- 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