From: Takashi Iwai Subject: Re: [PATCH] Reduce interrupt latency in sound/pci/via82xx.c Date: Tue, 13 Sep 2005 12:42:01 +0200 Message-ID: References: <200509121418.05184.annabellesgarden@yahoo.de> <200509121509.27712.annabellesgarden@yahoo.de> <200509121631.32066.annabellesgarden@yahoo.de> <4325FA70.3090702@superbug.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <4325FA70.3090702@superbug.co.uk> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: James Courtier-Dutton Cc: Karsten Wiese , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 12 Sep 2005 23:00:16 +0100, James Courtier-Dutton wrote: > > Karsten Wiese wrote: > > Am Montag, 12. September 2005 15:09 schrieb Takashi Iwai: > > > >>Hmm, then let's fix the handling of 0 read in all cases. > >>We can simply assume the next period in this case as an exception. > > > > > > No. I've looked at the change sequence of CUR_COUNT through an iopl(3)ed > > app running as root polling CUR_COUNT. > > The problem case looks like this: > > step value > > ====== ========== > > 0 0x01000020 // page index 1, 32 bytes left to transfer > > 1 0x01000000 // page index 1 complete > > 2 0x02000000 // switched to page index 2, looks like complete > > // _but hasn't yet started!_ > > 3 0x02001000 // page index 2, 4096 bytes left to transfer > > > > > > Step 1 values could be red up to ~270 times in a row. > > Step 2 values occurred maximum 2 times in a row so far. > > > > That looks truely horrible. > So upper byte in counting up, and lower 3 bytes are counting down!!! It's the correct behavior. The lower 3 bytes are the _residual_ counter, and the upper byte is the index of the SG buffer descriptor. Takashi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf