7.0-PRERELEASE desktop system periodically freezes momentarily
joe at skyrush.com
Wed Jan 23 11:26:41 PST 2008
J.R. Oldroyd wrote:
> On Wed, 23 Jan 2008 08:27:58 -0700, Joe Peterson <joe at skyrush.com> wrote:
>> Also, it seems that intermittent mouse freezes happen more often when
>> I've been away from the machine for a while and return to start using
>> the mouse again, but that's not always the case. A few short
>> freezes/stutters happen a second or so after mouse movement resumes.
> I don't see any postings from you showing any ktr dumps. Do you have
> any? Your symptoms (that it seems to happen after you've been away
> for a while and then return and move the mouse) sound a lot like mine.
Hi J.R., here is the post that contains links to my dumps:
> I posted some ktr dumps and have since chatted off-list with Kris and
> Sam about what may be up. My dumps show the shared irq ath/pcm and
> the ath taskq are hogging the cpu for ages without the clock swi getting
> to run at all. Sam has suggested experimenting with the ath taskq
> priority and also with disabling ath bg scans which I will do, but
> right now I am back to looking at powerd again as the possible cause.
Hmm, well I don't have an Atheros on this machine - only ethernet.
Also, I have not tried playing audio, so what I am seeing is simply with
> I ran without powerd for a while when originally suggested by David
> Lawrence on Jan 12th. I believe I did still see freezes then, but I
> re-enabled powerd when I was ready to do LOCK_PROFILING and then ktr
> monitoring; I re-enabled it so I could be sure I had the same test
> conditions. At this point, I am no longer sure what happened when
> powerd was disabled. My recollection is that there were freezes while
> powerd was off, but the only email in which I appear to have posted
> about that says "no freezes so far". So I'm running without powerd again,
> and at this point, several hours at the computer over two days, I have
> not seen further freezes. Does anyone else who sees these freezes also
> have powerd enabled and can try without powerd for a while?
Mine is a desktop machine, so I have not enabled powerd.
> Since these freezes are proving so hard to pinpoint, it may be worth
> comparing notes to try to find things in common between the systems
> or eliminate other things. But first, it seems like we may be chasing
> three separate causes:
> 1. the softupdate freeze
> after removing a very large file (e.g., >1Gb) there is a
> noticeable freeze while the softupdate runs
> 2. the busy freeze
> folk complain of short freezes and mouse jerkiness while
> the system is busy, e.g., glxgears or compilations
> 3. the idle freeze
> short and longer freezes (some going into minutes) apparently
> when resuming work after having left the system mostly idle
> for a while
> Now, I also had the "busy freeze" when I first tested 7.0. At that time
> (several weeks back now) someone suggested switching to the ULE scheduler,
> which I did, and the symptoms I had were dramatically improved. Since
> then I've had occasions to run several compilations at once and had no
> mouse jerkiness. But for folk who still have it: what scheduler do you
> have and what processes are running when it happens?
I seem to see #2 (busy freezes). They are usually very short
(sub-second) freezes, and they happen randomly as I move the mouse
(well, I assume that I see it manifested in a mouse freeze, but it could
very well be a system or X freeze, since I see it in keyboard
key-held-down too). The mouse usually moves smoothly, but every once in
a while, it "sticks" for a fraction of a second as I move it -
irritating to say the least. Often the small freezes come in spurts,
but they often are one at a time as well. When it comes in spurts, it
is often shortly after moving the mouse after lots of idle time (as if
the scheduler "wakes up" and has some fits for a short time - a
"non-scientific" description ;).
I am using ULE on 7.0. I'm also using ZFS (so the soft-updates issue
doesn't apply, and I spoke with someone else who uses UFS2, not ZFS, and
he said the mouse jerked around pretty badly in 7.0 on his machine).
I started with using 4BSD under 7.0, of course, and yes, there were
worse batches of freezes with it, especially when starting KDE and when
compiling the kernel (it was nearly constant). With ULE, I no longer
see compiles causing freezes, and generally the freezes are more subtle
and shorter - in other words, ULE *is* better than 4BSD in this respect,
but it is still worse than normal operation under FreeBSD 6.2 with 4BSD
(although under 6.2/4BSD, I did see the occasional freeze during
compiles - not nearly as obvious or often as 4BSD under 7.0).
So, in my experience:
6.2/4BSD: smooth mouse motion all of the time except rare freezes during
7.0/4BSD: terrible mouse jerkiness under any load, especially when
7.0/ULE: smoother than 7.0/4BSD and freezes not correlated with
compiling, but still worse than 6.2/4BSD
> At the moment, I'm chasing an "idle freeze". In other emails, I've
> posted details of what processes are typically running and several ktr
> dumps of such events. As noted, I'm looking again into powerd right
> now, and if that isn't it, I'll go to the ath taskq prio and scan stuff
> that Sam suggested. Anyone else with an idle freeze care to post
> details of what scheduler and processes are in use?
If you can, see if my ktr dumps show anything. I am not experienced in
interpreting them, so I did not want to draw any conclusions.
As I said in my last post, causing lots of X events while another
process is using CPU (under ULE) does cause the mouse to become really
jerky, and this was at first not surprizing, but I cannot get this to
happen at all under Linux CFS (2.6.23), so I wonder if there is
something else, like some hard locking, going on in FreeBSD. The nature
of the freezes do feel like little hard locks (but again, this is just
my gut feel, and I am not knowledgeable enough in FreeBSD internals to
More information about the freebsd-stable