From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] cs46xx update SMP fixes Date: Thu, 22 Aug 2002 15:40:43 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3D64B60D.5070907@cucumelo.org> <3D64E811.30005@cucumelo.org> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <3D64E811.30005@cucumelo.org> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Benny Sjostrand Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Thu, 22 Aug 2002 15:33:05 +0200, Benny Sjostrand wrote: > > > > > > >could you rewrite mutex with spinlock if not too long held? > > > >you cannot use mutex on trigger since this could be called from > >interrupt handlers, too (in order to stop the stream when xrun is > >detected). > > > I believe that the critical sections are too long and will lose to much > performance > on a SMP machines that's why i've choose the mutex instead of spin_locks. > However, that the trigger functions could be called from interrupt > context is new to me, > thanks to pointing it out. > Mutexes are used in _trigger function in current CVS too, not directly > in trigger function, > but in _link and _unlink function called by _trigger, and SMP is broken, > so in some > way we need to fix it. > > I'll try to come with another solution, if you have any suggestion how > to solve it, then great. how about to do pcm_link/unlink in open/close or prepare callback? they are definitely not called from interrupts. Takashi ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390