Re: Kevent(2) doesn't notify about EVFILT_WRITE filter event
John-Mark Gurney wrote on 01.12.2005 10:55 MSK: JMG> Dmitry Agaphonov wrote this message on Thu, Dec 01, 2005 at 15:06 +0300: JMG> > I have two applications (server A and server B, A asks B for data to JMG> > serve clients) communicating via UNIX-domain socket. Testing local JMG> > clients interact to server A via UNIX-domain sockets too. Server A JMG> > uses kqueue(2) to handle clients and server B. JMG> > JMG> > When about 20 clients start requesting server A without delay, kevent(2) JMG> > doesn't notify about requested EVFILT_WRITE after only few small JMG> > requests. JMG> > JMG> > JMG> > Dumping kevent(2) changelist and eventlist gives the following: JMG> > JMG> > Server A asks for write event (with EV_ONESHOT flag set) to server B: JMG> > [13:45:36][DBG] Changing SysEvent: ident: 8, filter: -2, flags: 0x11, fflags: 0, data: 0, udata: 0x0 JMG> > [13:45:36][DBG] Received SysEvent: ident: 8, filter: -2, flags: 0x11, fflags: 0, data: 8192, udata: 0x0 JMG> > JMG> > So, the socket send buffer has 8192 bytes free. Then A sends 426 JMG> > bytes to B. JMG> > JMG> > Then server A asks for write event again: JMG> > [13:45:36][DBG] Changing SysEvent: ident: 8, filter: -2, flags: 0x11, fflags: 0, data: 0, udata: 0x0 JMG> > JMG> > After this, EVFILT_WRITE event is not returned. Noone else writes to JMG> > this socket. How it is possible? JMG> JMG> are you checking the output from the kevent that sets the sysevent? JMG> kevent if you do something "stupid" like set a _ONESHOT in kevent, and JMG> provide space for events to be returned to userland, the _ONESHOT will JMG> be immediately returned and cleared... JMG> JMG> It could also be an error is trying to be set, but can't be if you JMG> don't provide return space... so w/o seeing your code, I'd make sure JMG> when setting you are able to receive some events, and check what events JMG> you get back... Not in this, but that was my fault. Thank you for answer. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: noise level measurement with Atheros driver
Lang, Tanja wrote: Hi, I would like to record signal strength and noise level for each client packet received on a wireless access point. I found the fields IEEE80211_RADIOTAP_DBM_ANTSIGNAL and IEEE80211_RADIOTAP_DBM_ANTNOISE in the radiotap header which should give me this information. The 'wi' interface sets both of these values in if_wi.c if_wi.c:sc->sc_rx_th.wr_antnoise = frmhdr.wi_rx_silence; if_wi.c:sc->sc_rx_th.wr_antsignal = frmhdr.wi_rx_signal; While the 'ath' interface only provides signal strength information. if_ath.c sc->sc_rx_th.wr_antsignal = ds->ds_rxstat.rs_rssi; Is the Atheros driver (which my current wireless card in the AP uses) capable of providing noise information? If yes, which line needs to be added in if_ath.c? Can't get calibrated noise floor info with the current hal. I've done the work and it will be available in the next hal I release. Sam ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
noise level measurement with Atheros driver
Hi, I would like to record signal strength and noise level for each client packet received on a wireless access point. I found the fields IEEE80211_RADIOTAP_DBM_ANTSIGNAL and IEEE80211_RADIOTAP_DBM_ANTNOISE in the radiotap header which should give me this information. The 'wi' interface sets both of these values in if_wi.c if_wi.c:sc->sc_rx_th.wr_antnoise = frmhdr.wi_rx_silence; if_wi.c:sc->sc_rx_th.wr_antsignal = frmhdr.wi_rx_signal; While the 'ath' interface only provides signal strength information. if_ath.c sc->sc_rx_th.wr_antsignal = ds->ds_rxstat.rs_rssi; Is the Atheros driver (which my current wireless card in the AP uses) capable of providing noise information? If yes, which line needs to be added in if_ath.c? Thanks, Tanja ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
freeing disk block in 4.x kernel
Hi, I am trying to find out where in the kernel code blocks on disk are freed. I want to track all the blocks freed on the disk as a result of file deletes etc., in my pseudo disk driver. Is there an equivalent of a blockfree() or something in the 4.x kernel code, where I can put a hook into my driver? Thanks, Sid. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
clock interrupts eating whole cpu [solved]
Hi, I have spent whole day to track what is wrong with this interrupts. I found that altq is the problem. When i turn on pf only with rules my box behaves normally. When i turned on altq rules in one second my whole cpu was used. what was strange that i didn't change rules in some significant way. I checked them and i found that i left one rule like this pass all on pfsync0 i have added this rule when i was messing with pfsync iface. I forgot to remove it. When i removed this rule everything come back to normal state. This quite strange that this rule can cause such big mess on system. Is it some kind of bug ?? -- Best Regards: GiZmen UNIX is user-friendly; it's just picky about its friends UNIX is simple; it just takes a genius to understand its simplicity ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cwnd and sstresh monitor
Alin-Adrian Anton wrote: I used it now, and with a small patch it shows exactly what I need (seq, ack, timestamp, cwnd and ssthresh). I just added my knob to trpt.c . I also modified the iptime() function to provide microsecond resolution instead of miliseconds, because most of the packets have the same timestamp attached. Still, a decent number of packets have the same timestamp. I'm looking at them only on one side of the connection (the transmitter), I wonder if there is any better solution then timestamping them on both sides - and mixing the values. Thanks guys for the precious information, it helped a lot! Actually the method above had issues, packets not being logged in the debug buffer (which is limited and gets discarded quickly). Using trpt -f did solve this problem, at the cost of duplicate entries. So what finally did the job was a small "patch" of tcp_debug.c to print on console and print only what is needed (FreeBSD 6.0 won't allow "options TCPCONSDEBUG"), and /var/log/messages was parsed to extract the values. Cheers, -- Alin-Adrian Anton GPG keyID 0x183087BA (B129 E8F4 7B34 15A9 0785 2F7C 5823 ABA0 1830 87BA) gpg --keyserver pgp.mit.edu --recv-keys 0x183087BA "It is dangerous to be right when the government is wrong." - Voltaire ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: clock interrupts eating whole cpu
> >yesterday i have noticed that my cpu is runnig on 100%. > >And almost 100% is used on interrupts > > > > > PID USERNAME THR PRI NICE SIZERES STATETIME WCPU COMMAND > > 27 root1 -32 -151 0K 8K RUN 62:48 67.72% swi4: clock > > Verify you don't have a console screen-saver configured, especially a > graphical one - it happened to me several times. No i don't have screen saver on my box. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: clock interrupts eating whole cpu
GiZmen wrote: Hi, yesterday i have noticed that my cpu is runnig on 100%. And almost 100% is used on interrupts PID USERNAME THR PRI NICE SIZERES STATETIME WCPU COMMAND 27 root1 -32 -151 0K 8K RUN 62:48 67.72% swi4: clock Verify you don't have a console screen-saver configured, especially a graphical one - it happened to me several times. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
clock interrupts eating whole cpu
Hi, yesterday i have noticed that my cpu is runnig on 100%. And almost 100% is used on interrupts CPU states: 0.0% user, 0.0% nice, 1.4% system, 98.6% interrupt, 0.0% idle i tried to check what is going on. I ran top and pressed S so i could see all processes: PID USERNAME THR PRI NICE SIZERES STATETIME WCPU COMMAND 27 root1 -32 -151 0K 8K RUN 62:48 67.72% swi4: clock 29 root1 -44 -163 0K 8K RUN 28:30 28.17% swi1: net 11 root1 171 52 0K 8K RUN 1:03 1.12% idle I have noticed that clock is eating most free cpu time. Net load is in normal because this is router for about 150 hosts. Could any one tell me what is going on? I am running FreeBSD 6.0-STABLE. i didnt have any problems like that before with FreeBSD 6.0-BETA ,RC,RELEASE and even STABLE. This happend yesterday or dwo days ago. I have downloaded newest src from cvsup and recompiled kernel which took quite long time due cpu usage. System is runnig postfix,mysql,apache2,dhcpd. I have attached my kernel config. I dont know where to look for problem. Please help me with this. -- Best Regards: GiZmen UNIX is user-friendly; it's just picky about its friends UNIX is simple; it just takes a genius to understand its simplicity machine i386 cpu I686_CPU ident BLURP makeoptions COPTFLAGS="-O2 -pipe -funroll-loops -ffast-math -fno-builtin" makeoptions CONF_CFLAGS="-O2 -pipe -funroll-loops -ffast-math -fno-builtin" #makeoptions DEBUG=-g options SCHED_4BSD #optionsSCHED_ULE # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET# InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories #optionsMD_ROOT # MD is a potential root device #optionsNFSCLIENT # Network Filesystem Client #optionsNFSSERVER # Network Filesystem Server #optionsNFS_ROOT# NFS usable as /, requires NFSCLIENT #optionsMSDOSFS # MSDOS Filesystem #optionsCD9660 # ISO 9660 Filesystem #optionsPROCFS # Process filesystem (requires PSEUDOFS) #optionsPSEUDOFS# Pseudo-filesystem framework options NULLFS options GEOM_GPT# GUID Partition Tables. options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #optionsSCSI_DELAY=15000# Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores #options SHMMAXPGS=4096 #options SHMSEG=256 #options SEMMNI=256 #options SEMMNS=512 #options SEMMNU=256 #options SEMMAP=256 options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV# install a CDEV entry in /dev #optionsAHC_REG_PRETTY_PRINT# Print register bitfields in debug # output. Adds ~128k to driver. #optionsAHD_REG_PRETTY_PRINT# Print register bitfields in debug # output. Adds ~215k to driver. options ADAPTIVE_GIANT # Giant mutex is adaptive. #device apic# I/O APIC # Bus support. Do not remove isa, even if you have no isa slots device isa device pci # Floppy drives #device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives #device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives options ATA_STATIC_ID # Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver device sc #device agp # support several AGP chipsets device npx # Add suspend/resume support for the i8254. device pmtimer #options CPU_ENABLE_TCC #options VESA options GEOM_BDE# Disk encryption. options ALTQ #option
(no subject)
[EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"