From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: PCM multi A/V Sync bug on SMP system Date: Fri, 30 Apr 2010 13:09:12 +0200 Message-ID: <4BDABA58.3090200@ladisch.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by alsa0.perex.cz (Postfix) with ESMTP id 6441A103804 for ; Fri, 30 Apr 2010 13:09:20 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Keith Chew Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Keith Chew wrote: > In pcm_dmix_i386.c, we have: > > if (!strncmp(line, "processor", 9)) > smp++; > > I have commented out the smp++, so that it thinks that I am on a uni > processor. Voila, so AV sync issues! > > My question now is what are the implications of this change? Looking > at pcm_dmix_i386.h, it uses locks on an SMP system, but exclude them > if not SMP. Do we still need this lock, even if I am on a dual core, > ie 1 processor 2 cores? Dual-core processors behave like two separate processors, i.e., they still have separate caches, so we still need to synchronize memory accesses to ensure that they happen in the correct order. I'd guess that the memory bus synchronization of the three dmix devices makes the memory accesses too slow. What is the CPU utilization of mplayer with and without SMP? Regards, Clemens