linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Ray <steve@mrmighty.net>
To: Richard Cooper <peajay@funrestraints.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: video sync timing + softer update
Date: Mon, 29 Aug 2005 23:54:09 -0300	[thread overview]
Message-ID: <4313CA51.5000902@mrmighty.net> (raw)
In-Reply-To: <op.swagf1lrnro9m0@sucks.airplane.fire>

Richard Cooper wrote:
>> Any ideas how I might sync to bit 3 of port 0x3DA, the video card's  
>> vertical sync signal?
> 
> 
> Well, I don't know if anyone cares, but since I asked the question here, 
> I  figure it's appropriate to let everyone know what I came up with.
> 
> As best I can tell, it's just not possible under Linux.  Everything 
> that  does vertical refresh syncing in Linux does it with a 
> CPU-time-eating busy  loop.  It seems it isn't possible to give up the 
> CPU for a period of time  shorter than 10-20ms.  Since vertical retraces 
> occur every 17ms, and 17 <  20, if you want to have the CPU when the 
> next retrace occurs, you can't do  any kind of sleeping.  This is the 
> case even under "realtime scheduling,"  which seems to be a misnomer for 
> what would be better called "priority  scheduling."
> 

What kernel series are you using?  Did you compile it yourself?  What is 
HZ set at?  100? 250? 1000?  If it's a 2.6 kernel, did you try enabling 
preemption?  With HZ at 100, it is impossible for the kernel to give you 
  better than 10 ms resolution.  With HZ at 1000, it can achieve 1 ms 
resolution (in theory).  What else is running on your machine?  These 
questions could help answer whether it's possible.

Stephen

  parent reply	other threads:[~2005-08-30  2:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-27 19:28 video sync timing Richard Cooper
2005-08-29 21:25 ` video sync timing + softer update Richard Cooper
2005-08-30  1:40   ` Frank Kotler
2005-08-30 12:40     ` Richard Cooper
2005-08-30  2:54   ` Stephen Ray [this message]
2005-08-30 13:44     ` Richard Cooper
2005-08-30 17:36       ` Stephen Ray
2005-08-30 20:24         ` Richard Cooper
2005-08-31  0:51           ` video sync: result of 2.6 kernel experimenting Richard Cooper
2005-08-31  3:58             ` Stephen Ray

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=4313CA51.5000902@mrmighty.net \
    --to=steve@mrmighty.net \
    --cc=linux-assembly@vger.kernel.org \
    --cc=peajay@funrestraints.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).