Re: HZ = 1000 slows down application

2003-10-08 Thread Terry Lambert
Luigi Rizzo wrote: On Tue, Oct 07, 2003 at 06:17:04PM -0400, [EMAIL PROTECTED] wrote: We did some intensive profiling of our application. It does not seem like we are depending on clock ticks for any calculations. On the other hand we notice that our slow iterations happen almost at the

Re: netisr

2003-10-08 Thread Terry Lambert
Giovanni P. Tirloni wrote: I'm studying the network stack and now I'm confronted with something called netisr. It seems ether_demux puts the packet in a netisr queue instead of passing it directly to ip_input (if that was the packet's type). Is this derived from LRP ? No. NETISR is a

/etc/services strange

2003-10-08 Thread Roman Neuhauser
According to http://www.iana.org/assignments/port-numbers, tcp/udp port 1000 is for cadlock2. Our /etc/services claims 1000/tcp is cadlock, and 1000/ucp ock. Also: http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/54371 -- If you cc me or remove the list(s) completely I'll most likely ignore your

Dynamic reads without locking.

2003-10-08 Thread Pawel Jakub Dawidek
Hello hackers... I'm wondering... Jeffrey Hsu was talking about this at BSDCon03. There is no need to lock data when we just made simple read, for example: mtx_lock(foo_mtx); foo = 5; mtx_unlock(foo_mtx); but only: bar = foo; IMHO this is quite dangerous. Let's

Re: /etc/services strange

2003-10-08 Thread Bruce M Simpson
On Wed, Oct 08, 2003 at 10:25:25AM +0200, Roman Neuhauser wrote: According to http://www.iana.org/assignments/port-numbers, tcp/udp port 1000 is for cadlock2. Our /etc/services claims 1000/tcp is cadlock, and 1000/ucp ock. Also: http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/54371

Re: /etc/services strange

2003-10-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-10-08 09:49:21 +0100: On Wed, Oct 08, 2003 at 10:25:25AM +0200, Roman Neuhauser wrote: According to http://www.iana.org/assignments/port-numbers, tcp/udp port 1000 is for cadlock2. Our /etc/services claims 1000/tcp is cadlock, and 1000/ucp ock. Also:

Re: Dynamic reads without locking.

2003-10-08 Thread Harti Brandt
On Wed, 8 Oct 2003, Pawel Jakub Dawidek wrote: PJDHello hackers... PJD PJDI'm wondering... PJDJeffrey Hsu was talking about this at BSDCon03. PJDThere is no need to lock data when we just made simple read, for example: PJD PJDmtx_lock(foo_mtx); PJDfoo = 5; PJDmtx_unlock(foo_mtx);

Re: Dynamic reads without locking.

2003-10-08 Thread Pawel Jakub Dawidek
On Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: + You need to lock when reading if you insist on consistent data. Even a + simple read may be non-atomic (this should be the case for 64bit + operations on all our platforms). So you need to do + + mtx_lock(foo_mtx); + bar = foo; +

Recovery from mbuf cluster exhaustion

2003-10-08 Thread Peter Bozarov
Hi, all, (First off, I hope I'm posting to the right list.) I have the following question regarding mbuf cluster exhaustion. If I've managed to exhaust the pool, I start getting the usual All mbuf clusters exhausted, please see tuning(7). message. Now, at that point this is what my mbuf pool

Re: Dynamic reads without locking.

2003-10-08 Thread Bruce M Simpson
On Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: You need to lock when reading if you insist on consistent data. Even a simple read may be non-atomic (this should be the case for 64bit operations on all our platforms). Or keep a generation count to detect pre-emption (the devstat

Re: Dynamic reads without locking.

2003-10-08 Thread Bruce M Simpson
On Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote: But I'm not talking about non-atomic reads. What I'm want to show is that even atomic read (without lock) is dangerous in some cases. + If you don't care about occasionally reading false data (for statistics or + such

Re: Dynamic reads without locking.

2003-10-08 Thread Harti Brandt
On Wed, 8 Oct 2003, Pawel Jakub Dawidek wrote: PJDOn Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: PJD+ You need to lock when reading if you insist on consistent data. Even a PJD+ simple read may be non-atomic (this should be the case for 64bit PJD+ operations on all our platforms).

Re: Dynamic reads without locking.

2003-10-08 Thread Harti Brandt
On Wed, 8 Oct 2003, Bruce M Simpson wrote: BMSOn Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: BMS You need to lock when reading if you insist on consistent data. Even a BMS simple read may be non-atomic (this should be the case for 64bit BMS operations on all our platforms). BMS

Re: Dynamic reads without locking.

2003-10-08 Thread Bernd Walter
On Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote: On Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: + You need to lock when reading if you insist on consistent data. Even a + simple read may be non-atomic (this should be the case for 64bit + operations on all our

Re: netisr

2003-10-08 Thread Giovanni P. Tirloni
* Terry Lambert ([EMAIL PROTECTED]) wrote: No. NETISR is a software interrupt that runs when software interrupts run, which is to say, when the SPL is lowered as a result of returning from the last nested hardware interrupt, which means on hardware and clock interrupts. Yes, I missed the

Re: Dynamic reads without locking.

2003-10-08 Thread Harti Brandt
On Wed, 8 Oct 2003, Bernd Walter wrote: BWOn Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote: BW On Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: BW + You need to lock when reading if you insist on consistent data. Even a BW + simple read may be non-atomic (this

Re: Dynamic reads without locking.

2003-10-08 Thread Bernd Walter
On Wed, Oct 08, 2003 at 02:11:12PM +0200, Harti Brandt wrote: On Wed, 8 Oct 2003, Bernd Walter wrote: BWOn Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote: BW But I'm not talking about non-atomic reads. What I'm want to show is that BW even atomic read (without lock) is

Re: Dynamic reads without locking.

2003-10-08 Thread Harti Brandt
On Wed, 8 Oct 2003, Bernd Walter wrote: BWOn Wed, Oct 08, 2003 at 02:11:12PM +0200, Harti Brandt wrote: BW On Wed, 8 Oct 2003, Bernd Walter wrote: BW BW BWOn Wed, Oct 08, 2003 at 12:12:22PM +0200, Pawel Jakub Dawidek wrote: BW BW But I'm not talking about non-atomic reads. What I'm want to show

Re: Dynamic reads without locking.

2003-10-08 Thread Bernd Walter
On Wed, Oct 08, 2003 at 02:58:02PM +0200, Harti Brandt wrote: uint8_t foo; (guaranteeing that the data type itself is atomic). But if a writer sets foo as above and you read foo without locking, you might get a wrong value: mtx_lock(...) foo = 77; -

Re: Dynamic reads without locking.

2003-10-08 Thread Frank Mayhar
I read the thread hoping to see a succint response to this and so far I don't see it. Here goes... Pawel Jakub Dawidek wrote: I'm wondering... Jeffrey Hsu was talking about this at BSDCon03. There is no need to lock data when we just made simple read, for example: mtx_lock(foo_mtx);

FreeBSD 5.1 via8233 module no sound

2003-10-08 Thread Hagen Kühl
Hello folks, a good friend of mine has some problems with the snd_via8233.ko sound driver module. He uses an Asus A7V8X-X mainboard with an via VT8233 AC97 compatible sound device (as scanpci says) and he's got no sound at all. #cat /dev/sndstat shows: FreeBSD Audio Driver (newpcm) Installed

Specialix I/O8+ driver available for abuse.

2003-10-08 Thread Frank Mayhar
I've finally finished that driver I've been working on, for the Specialix I/O8+ multiport serial card. I've dropped a source tarball into http://www.exit.com/Archives/FreeBSD/ It has a manpage as well as a file sx-kern-patches which patches conf/files and conf/options to allow you to

gcc object format - need motorola s-records.

2003-10-08 Thread Josef Karthauser
Does anyone know how to control the type of output files that gcc creates? I need to generate motorola S-records instead of ELF files, but I can't find a switch to make this happen. Do I need to build a new compiler by hand, and if so, does anyone know what the backend object format is called?

Re: gcc object format - need motorola s-records.

2003-10-08 Thread chuckr
Josef Karthauser wrote: Does anyone know how to control the type of output files that gcc creates? I need to generate motorola S-records instead of ELF files, but I can't find a switch to make this happen. Do I need to build a new compiler by hand, and if so, does anyone know what the backend

Re: gcc object format - need motorola s-records.

2003-10-08 Thread Eric Jacobs
On Wed, 8 Oct 2003 22:52:10 +0100 Josef Karthauser [EMAIL PROTECTED] wrote: Does anyone know how to control the type of output files that gcc creates? I need to generate motorola S-records instead of ELF files, but I can't find a switch to make this happen. Do I need to build a new compiler

Re: gcc object format - need motorola s-records.

2003-10-08 Thread Daniel Eischen
On Wed, 8 Oct 2003, Eric Jacobs wrote: On Wed, 8 Oct 2003 22:52:10 +0100 Josef Karthauser [EMAIL PROTECTED] wrote: Does anyone know how to control the type of output files that gcc creates? I need to generate motorola S-records instead of ELF files, but I can't find a switch to make

On-line judgment kernel module

2003-10-08 Thread earthman
I want to create on-line judge for acm like olympiads. So I have to execute some code that came in source from outside(www). Thus security problem is my main problem. The idea is to deny all syscalls for specific process p. This is possible even without rewriting kernel by kernel module. Now

Re: On-line judgment kernel module

2003-10-08 Thread Maxim Konovalov
On Thu, 9 Oct 2003, 07:46+0300, earthman wrote: I want to create on-line judge for acm like olympiads. So I have to execute some code that came in source from outside(www). Thus security problem is my main problem. The idea is to deny all syscalls for specific process p. This is possible