vmstat -i output after solving snd problems.

2006-10-01 Thread Marcin Koziej


Hello,
I use FreeBSD STABLE on Acer Aspire 1525, with VIA K8M400 chipset and 
VIA1612A on-motherboard sound card.


I've beet tracing STABLE from some time ago, and at some point of 5.X 
series my sound started to be distorted (clicks, lags, metallic sounds) 
in a random manner, with distortions correlated with network/disk activity.

(This was reported before -- kern/81599, and some posts here and there)

After setting hint.pcm.0.buffersize to a bigger value and applying 
patches from 	http://people.freebsd.org/~ariff/  (BTW: contrary to the 
message there, these don't seem to be MFC'ed (?)) the sound distortions 
were completely simultaneous with network activity. Neither CPU load 
(and acpi_perf changing the cpu speed) nor high disk i/o (unpacking 
sources, making /usr/libexec/locate.updatedb) affected the sound, but 
only as I entered IRC or openned some pages in a browser I did hear 
clicks and lags.

Apparently the reason was  pcm0 and re0 (Ethernet card) sharing one irq.

By setting a different IRQ for some of devices in BIOS and turning off 
APIC, I got a new irq layout which gives pcm0 an exclusive IRQ.

I rejoiced, because the sound is perfect now.

However, I have few questions:

1) Is turning off APIC a disadvantage? (I have read the wikipedia page 
on IO-APIC and I the machine is uniprocessor)

Will it bring my performance down? Or do other scary things to me?
Maybe there is a better way to force different IRQ layout.

2) vmstat -i now shows:
interrupt  total   rate
irq0: clk6824889968
irq1: atkbd0   13103  1
irq4: sio0 2  0
irq7: ppc071  0
irq8: rtc 890176126
irq9: nvidia0 cbb*464262 65
irq10: cbb0 uhci1* 3  0
irq11: ndis0 re0+ 130633 18
irq12: psm0   597273 84
irq14: ata0   118892 16
irq15: ata1   74  0
Total9039378   1283

Does it look normal? What do '*' and '+' after device names mean?
I couldn't find this information in man vmstat, google or even quich 
grep through vmstat.c. What am I missing?

Is there something to be worried about this?


Thank's for Your time and sorry for crossposting to -multimedia@ (some 
people searching it might (?) find this post helpful).


Regards,

m.





___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Poor swapping performance -- lot's of unused free memory.

2006-06-22 Thread Marcin Koziej


Hello,
I use FreeBSD 6.1-STABLE #0: Mon Jun 12 18:00:56 CEST 2006
for a desktop (Launch several apps at the start and mostly nothing else, 
except when compiling). I've got 512 MB of ram.


From some time, I've noticed poor swapping performance -- this can be 
very annoying when memory needs to be swapped in and the whole systems 
chokes on disk I/O. Most frequently when launching a big application or 
clicking on recently not used application window.


What I notice, is that top(1) reports: 60 MB free, and 150 MB on the 
swap, which means these 60 mb are just sitting there doing nothing.
I remember in older versions of FreeBSD tried to keep swap as little 
used as possible, leaving 3-4 mb ram free. This is just a feeling, of 
course, but it feels like it's slower now.


Can anybody comment on this?
Maybe there is a sysctl which can tune this ? (I've searched for such, 
but found nothing).


Best regards,
Marcin Koziej

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: STABLE kernel fails to build on sys/fs/devfs/devfs_vnops.c

2005-10-09 Thread Marcin Koziej
> > I tried to build today's STABLE on 6.0-BETA2 FreeBSD 6.0-BETA2 #1: Wed Aug  
> > 3
> > Kernel config differs from GENERIC just by atapicam device.
> 
> Obviously, your userland and kernel sources are not synchronized. It is
> probably the cause of failed build.
> 
> Update complete source tree and try again.

It doesn't seem to be that simple to me.
I have rm -rf'ed all the sources and cvsupped with tag=RELENG_6 and 
I cannot build a GENERIC kernel. The problem seems to be forward declarations
of:
static struct vop_vector devfs_vnodeops;
static struct vop_vector devfs_specops;
static struct fileops devfs_ops_f;
which are initialized later in the code. The compiler flag -Wredundant-decls 
stops
on this. These declarations appeared in rev 1.114.2.4 of 
/src/sys/fs/devfs/devfs_vnops.c

I guess it must be something with my system because that change was on 18th of 
September. 
I use a normal compiler ( 3.4.4 [FreeBSD] 20050518) on 6.0-BETA2.


-- 
m.
Brain power of a glass of water.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


STABLE kernel fails to build with device atapicam

2005-10-04 Thread Marcin Koziej
Hi,

I tried to build today's STABLE on 6.0-BETA2 FreeBSD 6.0-BETA2 #1: Wed Aug  3
Kernel config differs from GENERIC just by atapicam device.

[EMAIL PROTECTED]/i386/compile/TEST]:'< diff -u ../../conf/{GENERIC,TEST}
--- ../../conf/GENERIC  Thu Sep 22 14:36:38 2005
+++ ../../conf/TEST Tue Oct  4 13:39:26 2005
@@ -81,6 +81,7 @@
 device atapifd # ATAPI floppy drives
 device atapist # ATAPI tape drives
 optionsATA_STATIC_ID   # Static device numbering
+device atapicam #?

 # SCSI Controllers
 device ahb # EISA AHA1742 family
[EMAIL PROTECTED]/i386/compile/TEST]:'<

The kernel make process fails with:
cc -c -O -pipe -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  
-fformat-extensions -std=c99 -g -nostdinc -I-  -I. -I../../.. 
-I../../../contrib/dev/acpica -I../../../contrib/altq 
-I../../../contrib/ipfilter -I../../../contrib/pf -I../../../contrib/dev/ath 
-I../../../contrib/dev/ath/freebsd -I../../../contrib/ngatm -I../../../dev/twa 
-D_KERNEL -include opt_global.h -fno-common -finline-limit=8000 --param 
inline-unit-growth=100 --param large-function-growth=1000  
-mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow 
-mno-sse -mno-sse2 -ffreestanding -Werror  ../../../fs/devfs/devfs_vnops.c
../../../fs/devfs/devfs_vnops.c:1148: warning: redundant redeclaration of 
'devfs_ops_f'
../../../fs/devfs/devfs_vnops.c:70: warning: previous declaration of 
'devfs_ops_f' was here
../../../fs/devfs/devfs_vnops.c:1159: warning: redundant redeclaration of 
'devfs_vnodeops'
../../../fs/devfs/devfs_vnops.c:68: warning: previous declaration of 
'devfs_vnodeops' was here
../../../fs/devfs/devfs_vnops.c:1181: warning: redundant redeclaration of 
'devfs_specops'
../../../fs/devfs/devfs_vnops.c:69: warning: previous declaration of 
'devfs_specops' was here*** Error code 1

Stop in /home/src/sys/i386/compile/TEST.

Can anyone confirm this and preheaps send a PR or a note to the commiter,
I'm short of time and cannot do it myself.

Thanks,
-- 
m.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: re0 "no carrier" problem - Patches found in archives didn't work.

2005-06-19 Thread Marcin Koziej
> Not sure if it is solely "switch related".  I encountered the very same
> problem for months now using different links ans switches.  Moreover, it
> seems to be FreeBSD specific since the same machine works better with
> others OSes.
> 
> See PR kern/80005 for a more long description on a very similar problem.

I've seen this, but it didn't help a lot. I'll try to investigate on this, but 
I have a question - how? Should i just insert loads o printf's here and there 
to see what functions are called when the link fails? (Brings back memories... 
;>) 

It would be cool having dtrace ported 


-- 
m.
Brain power of a glass of water.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: re0 "no carrier" problem - Patches found in archives didn't work.

2005-06-19 Thread Marcin Koziej
> I may be replying to the wrong thread, but if I remember a previous 
> post, this is for a realtek gig-e card going to a gig-e switch... 
> Just another obvious point but you are using either Cat-5e or Cat-6 
> cables, right? Just thought I'd offer another obvious suggestion. :)

I just want my 10baseT/UTP :P !!! the card can do that. The rest seems too 
because sometimes everything works just fine :) The "sometimes" is the problem.

m.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: re0 "no carrier" problem - Patches found in archives didn't work.

2005-06-19 Thread Marcin Koziej


[04:12 19-06-2005] Tom Pepper <[EMAIL PROTECTED]>
> this may seem obvious, but do you still have the same issue if you  
> statically define the mediatype to a fixed link speed and duplex?   
> lots of interfaces have problems negotiating autoselect with  
> switches, as protocols vary widely.  the blinking is indicative of  
> autoselect setup woes...

This wasn't obvious for me! Thanks for the answer!

When I set the media by hand it showed 'active', but no data could be 
transmitted 
(yellow link diode on switch, not blinking). I then pulled the switch with my 
home 
lan from the wall and plugged my re0 instead - It worked! 

So this seems to be the %$R#(@%*$ switch issue. The funny thing is, that with 
media 
set manually (or sometimes with autoselect) everything works fine with this 
switch 
(i have used it all day yesterday till evening without problem). Now, when i 
wait 
some time with media manually set, it starts transmitting data and everything 
works fine. 
Why does it happen? Why is it so unpredictible? Can it be fixed in software, 
or should i throw the switch out the window and by a new one?

Thanks and best regards,

m.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


re0 "no carrier" problem - Patches found in archives didn't work.

2005-06-18 Thread Marcin Koziej

Hello. I am running a recent FreeBSD STABLE i386 [lack of nvidia-amd64 :( ] on 
amd64 Acer Aspire 1525 machine. I have a RealTek 8169SB Single-chip Gigabit 
Ethernet on rgephy RTL8169S/8110S media interface. 
The card is properly detected by the pci/re driver and shows up in ifconfig, 
but I'm expereiencing unpredictible problems with setting up link: Sometimes 
re0 reports it status ''no carrier'', even when everything was working fine a 
boot before.

A common scenario:
After boot, the status is active and media 'autoselect: 10baseT/UTP 
), but when i try to do anything with the interface (ifconfig re0 
up, dhclient re0) it changes to "no carrier" and mode to autoselect (none).

The diode on re0 card's port blinks with yellow light (compared to stable green 
when working) about once a second. When the blink occures, it also happens on 
the my switch's diodes where the cable is connected. [They occur in a rapid 
sequence - the green 'Act' diode first, then 'Link' blinks for a fraction of 
second after which both go dark]

Sometimes after waiting several minutes it changes to active again. Sometimes 
not.

It was mentioned before, I have tried patches i could find,
the one from:
http://lists.freebsd.org/pipermail/freebsd-stable/2005-March/013107.html
seems to do what it's supposed to, ie. 

--- from rgephy.c part:
+   if (bmcr & RGEPHY_BMCR_ISO) {
> this never happens.
+   mii->mii_media_active |= IFM_NONE;
+   mii->mii_media_status = 0;
+   return;
+   }

 from if_re.c part:
+
+   for (phy = 0; phy < 32; phy++) {
+   bmsr = re_miibus_readreg(dev, phy, MII_BMSR);
+   bmsr = re_miibus_readreg(dev, phy, MII_BMSR);
+   if (!bmsr) continue;
---> goes here with phy = 1
+
+   re_miibus_writereg(dev, phy, MII_BMCR, BMCR_RESET);
+   for (i = 0; i < RL_TIMEOUT; i++) {
+   if (!(re_miibus_readreg(dev, phy, MII_BMCR) &
+   BMCR_RESET)) break;
+   DELAY(100);
+   }
> breaks with i = 0
+   re_miibus_writereg(dev, phy, MII_BMCR, BMCR_LOOP);
+
+   break;
+   }

Unfortunately this doesn't fix the problem.

I have also found some additional patches for if_re but i couldn't apply them 
to stable - if_re.c changed and i wasn't sure how to merge it.

Please help, I spent a week searching for a fix :( I'm eager to check any patch 
sent, spend the afternoon in ddb, etc. Just tell me what/where to search - my 
knowledge on network drivers is close to nil.

-- 
m.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"