Re: New sound driver and Linux games

1999-12-18 Thread Jacob A. Hart

> On Sat, 18 Dec 1999, Chris Piazza wrote:
>
> > On Sat, Dec 18, 1999 at 05:59:14PM -0800, Brian W. Buchanan wrote:
> > > The new sound driver (I'm using pcm0 and sbc0) seems to break a lot of
> > > Linux-centric games.  Quake2, Q3Test, and snes9x (built from ports) all
> >
> >not a linux binary.
> > 
> > I noticed snes9x's sound acting really weird too earlier today.
>
> Yeah, I know snes9x isn't a linux binary, but it was written with Linux
> (and hence its sound system) in mind, not portability.  snes9x plays about
> a half second of audio for me, then loops it a few times before dying with
> either SIGBUS or SIGSEGV.  I've tried rebuilding it in case it had
> something to do with include file changes, but no dice.
>

I don't think the looping/flangy audio in Q3Test is entirely the FreeBSD
sound driver's problem.  I have a friend who runs Linux and uses the
ALSA (Advanced Linux Sound Architecture) driver.  According to him, the
ALSA driver suffers from the same symtoms our sbc/pcm combo does when
playing Q3Test.  I don't know if he's tried running Q2 or snes9x using
ALSA drivers though.

It could be that the OSS Voxware driver does something "unintentional"
that some programmers are relying on.  Unreal Tournament and XMAME audio
works fine under newpcm, for instance.

Strange.


-jake


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: gcc -Os optimisation broken (RELENG_4)

2000-03-18 Thread Jacob A. Hart

Donn Miller wrote:
>
> It's probably more of a "placebo effect", which makes you think your
> are getting a big boost in performance.  I'll admit that I've never
> seen a whole order or magnitude increase in performance between -O and
> -mpentium-O3, or whatever - it probably gives you boosts here and
> there.  Optimization is pretty good, as I've found out, with
> plain-jane -O.  Beyond that, I think your performance gains are
> minimal.
> 
> And yes, I think it's really macho to be usin' hopped-up CFLAGS, like
> -march=pentium -Os -pipe.  I feel really studly doing this. :-)

Damn straight!

But you ain't seen nothing yet...

> We should do a survey, and find out what the guys use for CFLAGS and
> COPTFLAGS and compare them to what the female users are using.  That
> would be interesting.

Let's get the ball rolling then, shall we?

CFLAGS/COPTFLAGS for day-to-day compiles (kernel, X, world, etc.):
-O3 -march=pentiumpro -malign-double -fomit-frame-pointer -funroll-loops
-fstrict-aliasing -pipe

CFLAGS when I *REALLY* feel the need for speed (lame, mpg123, xmame,
etc.):
-O3 -march=pentiumpro -malign-double -malign-loops=4 -malign-jumps=4
-malign-functions=4 -fomit-frame-pointer -ffast-math -funroll-loops
-fstrict-aliasing -pipe

-O2 used to be my switch of choice so the -funroll-loops flag in the
above strings may be redundant (can't remember).  Considering, though,
that the length of one's CFLAGS variable is directly proportional to
studliness, I have little choice but to leave it there ;-)

Can't say that I care for football, though.

> - Donn

-jake
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Scheduler changes?

2000-05-25 Thread Jacob A. Hart

For the past couple of weeks I've noticed rc5des isn't playing friendly with
the other processes on my system.  When running a CPU intensive task (such
as a buildworld, MP3 encoder, or xmame) rc5des hogs around 20-30% CPU even
though, by default, it is niced at +20.

The last known "good" kernel build I have here is almost a month old -- 29th
of April.  It broke sometime between then and May 6th, and I haven't had a
build that doesn't exibit this behaviour since.

Anyone else noticed similar symptoms?


-jake

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #9: Fri May 26 07:39:27 EST 2000

   I believe the technical term is "Oops!"

 PGP signature


Re: Scheduler changes?

2000-05-27 Thread Jacob A. Hart

On Fri, May 26, 2000 at 04:01:05PM +0200, Sheldon Hearn wrote:
> 
> 
> On Fri, 26 May 2000 13:19:49 +1000, "Jacob A. Hart" wrote:
> 
> > For the past couple of weeks I've noticed rc5des isn't playing friendly with
> > the other processes on my system.  When running a CPU intensive task (such
> > as a buildworld, MP3 encoder, or xmame) rc5des hogs around 20-30% CPU even
> > though, by default, it is niced at +20.
> 
> As a datapoint, I have a one week old (2000-05-18) CURRENT box that runs
> setiathome all day every day.  When builds kick in, setiathome gets
> relagated to the single-digit percentiles in top's display of CPU users.
> This is only true when serious building is happening; those aspects of
> the build that I can imagine are more I/O than CPU intensive give
> setiathome a fighting chance.

Yep.  That makes sense.

What puzzles me, though, is the behaviour for processes that aren't I/O
bound.

Here are two top snapshots taken while encoding an MP3 stream directly from
a .wav file on disk.  In both cases, the processes were given ample time to
"stabilize" (ie. were left running for about two minutes before the snapshot
was taken).


Kernel from 26th May:

last pid: 23929;  load averages:  1.66,  0.85,  0.44up 1+09:10:34  17:01:31
35 processes:  3 running, 32 sleeping
CPU states: 69.6% user, 28.4% nice,  0.8% system,  1.2% interrupt,  0.0% idle
Mem: 65M Active, 33M Inact, 20M Wired, 4480K Cache, 22M Buf, 772K Free
Swap: 256M Total, 256M Free

  PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
23929 root  79   0  7656K  2024K RUN  0:59 67.56% 66.55% lame
  174 root  81  20   952K   436K RUN320:40 30.27% 30.27% rc5des


Kernel from 29th April:

last pid:   235;  load averages:  1.93,  1.02,  0.45up 0+00:06:00  17:09:10
26 processes:  3 running, 23 sleeping
CPU states:  100% user,  0.0% nice,  0.0% system,  0.0% interrupt,  0.0% idle
Mem: 12M Active, 49M Inact, 16M Wired, 12K Cache, 22M Buf, 47M Free
Swap: 256M Total, 256M Free

  PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
  235 root  62   0  7684K  2260K RUN  2:15 98.44% 98.34% lame
  174 root  68  20   952K   584K RUN  2:57  0.00%  0.00% rc5des


Check out that rc5des process -- hogging (on average) about 30% CPU in the
first case!

My system feels noticibly sluggish too.  The rc5des process interferes with
just about everything (xmame, for example, is unplayable unless I disable it).
I think I'll stick with the April 29th kernel for now ;-)


-jake

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #4: Sat Apr 29 07:29:02 EST 2000

  Loose bits sink chips.

 PGP signature


Re: Scheduler changes?

2000-05-27 Thread Jacob A. Hart

On Sat, May 27, 2000 at 12:38:36PM -0700, Doug Barton wrote:
>
>   Try setting the nice value for rc5 to something lower than 20, but
> higher than the highest (lowest) value running on your system. There was
> a bug with the scheduler in the past that items run at nice 20 were
> actually getting more cpu than they were supposed to.

I remember the scheduler bug you're talking about.  My system feels much
the same as it did during 4.0-CURRENT when that bug was active.  I had a
collection of wrapper scripts for CPU intensive programs that suspended
rc5des, ran the program, then reenabled it again.  Should have held on to
them, I guess.

> If this change
> fixes things for you, please report it asap, since my understanding is
> that this problem is rather elusive and annoying.

No, it didn't work, unfortunately.  To test it, I renice'd rc5des to a
couple of different values while encoding an MP3.

When niced at:  +10 rc5des chewed ~40-45% CPU
+15 rc5des chewed ~35-40% CPU
+20 rc5des chewed ~25-30% CPU

If there's any other information I can provide, just let me know.


-jake

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #9: Fri May 26 07:39:27 EST 2000

   I believe the technical term is "Oops!"

 PGP signature


Re: Scheduler changes?

2000-06-10 Thread Jacob A. Hart

On Sat, Jun 10, 2000 at 10:56:00AM +0300, Volodymyr Kostyrko wrote:
> 
>   I think this is not the clear solution for descibed problem 'couse the
> dnetc client still gets a priority and still have the share of time while
> other programs might run. For me idprio works great. Just change last
> string in the starting shell scipt.
> 
>   idprio 31 su nobody -c "$dir/dnetc -quiet" 2>/dev/null >/dev/null &

I had no idea this wonderful little utility existed.  It's a godsend!

Thanks.


-jake

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #17: Fri Jun  9 21:58:34 EST 2000

   "One world, one web, one program"  -- Microsoft promotional ad
 "Ein Volk, ein Reich, ein Fuehrer"  -- Adolf Hitler


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Scheduler changes?

2000-06-11 Thread Jacob A. Hart

On Fri, Jun 09, 2000 at 08:28:06PM -0400, Brian Fundakowski Feldman wrote:
>
>The diff should make a process at -20 which uses all available CPU
> schedule just slightly the ahead of a process at +20 which uses no CPU.
> A process which uses full CPU at 0 niceness would have a priority of
> 128, whereas a process using no CPU at 0 niceness would have a priority
> of 90. All processes will always have a priority less than or equal to
> 128, which is the priority at which a process with a niceness of +20
> always runs at. A +20 process won't get better priority than anything
> else, period. Try it out, see how it works for you:)

I tried this patch today.

While it didn't quite fix the problem, it sure made for some interesting
pacman gameplay.  ;-)

Using idprio as Volodymyr suggested seems to be a viable workaround.  You
mentioned in another message that idprio could potentially deadlock my
machine, though.  Under what conditions could this happen (and how likely
is it to occur)? 


-jake

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #18: Sun Jun 11 19:25:03 EST 2000

 PGP signature


Re: compiling kernel with -Os or -O2

2000-06-19 Thread Jacob A. Hart

A word of advice for those who use modules:

If you've recompiled the kernel with -O and the system still won't boot, be
sure to set CFLAGS="-O -pipe" in /etc/make.conf so that your modules are
also compiled with -O.  A -O kernel with -O2 modules _doesn't_ work (on my
system anyway).

Now that modules are built with the kernel, perhaps COPTFLAGS should be the
optimisation variable responsible for both kernel _and_ modules?


-jake

On Sun, Jun 18, 2000 at 07:17:26PM -0400, Donn Miller wrote:
> Anyone try to compile the kernel with an optimization higher than -O,
> such as -Os or -O2?  For example, when I compile my kernel with -Os, I
> get a "fatal trap 12:  page fault in supervisor mode" right after I
> see this on my screen while the kernel is booting:
> 
> Copyright (c) 1992-2000 The FreeBSD Project.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California. All rights
> reserved.
> FreeBSD 5.0-CURRENT #0: Sun Jun 18 19:06:34 EDT 2000
> [EMAIL PROTECTED]:/usr/src/sys/compile/CUSTOM
> Timecounter "i8254"  frequency 1193182 Hz
> CPU: Pentium/P55C (166.45-MHz 586-class CPU)
>   Origin = "GenuineIntel"  Id = 0x543  Stepping = 3
>   Features=0x8001bf
> real memory  = 62914560 (61440K bytes)
> 
> 
> This is all the further the boot gets before the page fault.  Of
> course, as David O'Brien pointed out, optimization levels beyond -O
> aren't supported.  But, I'm curious as to what the cause of this is,
> as it may reveal a deeper problem someplace.  For example, is the
> problem with binutils, the kernel source code, or both?  Hopefully,
> we'll find out after the binutils upgrade is complete.
> 
> I should point out that using -O to compile the kernel gives no
> problems booting; it's just -Os that causes the problems for me.
> 
> - Donn
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

-- 
Jacob A. Hart <[EMAIL PROTECTED]>
Powered by: FreeBSD 5.0-CURRENT #25: Sat Jun 17 14:16:03 EST 2000

   I believe the technical term is "Oops!"

 PGP signature