All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: Karsten Wiese <annabellesgarden@yahoo.de>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@lists.sourceforge.net
Subject: Re: [PATCH] Reduce interrupt latency in sound/pci/via82xx.c
Date: Mon, 12 Sep 2005 23:00:16 +0100	[thread overview]
Message-ID: <4325FA70.3090702@superbug.co.uk> (raw)
In-Reply-To: <200509121631.32066.annabellesgarden@yahoo.de>

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!!!

Can you please give me some indication of how long the register stays at 
each value, and at what point the interrupt happens.

Are you also saying that the count can proceed like this:
0x01000000
0x02000000
0x02001000
0x02000fff
...
0x02000001
0x02000000
0x03000000

So, here we actually have 0x0200000 twice in the same sequence. That 
sort of situation will never work well and there is really not a lot 
that can be done except to say that whenever ((value & 0xffffff) == 0) 
we don't have a clue where we are in the buffer!

You say the Step 1 values could be red up to ~270 times in a row but 
Step 2 values occured max 2 times in a row. Can we assume therefore that 
the counter is getting stuck st Step 1 for some reason?

James


-------------------------------------------------------
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

  parent reply	other threads:[~2005-09-12 22:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 12:18 [PATCH] Reduce interrupt latency in sound/pci/via82xx.c Karsten Wiese
2005-09-12 12:35 ` Takashi Iwai
2005-09-12 13:09   ` Karsten Wiese
2005-09-12 13:09     ` Takashi Iwai
2005-09-12 14:31       ` Karsten Wiese
2005-09-12 15:07         ` Takashi Iwai
2005-09-12 22:00         ` James Courtier-Dutton [this message]
2005-09-13 10:42           ` Takashi Iwai
2005-09-13 11:18           ` Karsten Wiese
2005-09-26 18:52             ` Karsten Wiese
2005-09-29 10:44               ` Takashi Iwai
2005-09-29 13:56                 ` Takashi Iwai
2005-10-18 12:42                 ` Karsten Wiese
2005-10-18 12:54                   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4325FA70.3090702@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=annabellesgarden@yahoo.de \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.