RE: accept

2001-02-04 Thread David Schwartz
> Ok, but fd 0 cant be a valid socket since its the stdin Wrong. fd 0 can be a valid socket. Read the man page to 'accept' again. Remember again that zero is a non-negative integer. > I posted that on this mailing list coz I thought that this might > be a scaling > problem since it

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
> What version of Linux are you using ? What I see is the following: I'm using 2.4.1-pre10, glibc 2.1.3. > Thread1 > Thread1 > Thread1 > Thread1 > Thread1 > Thread2 > Thread2 > Thread2 > Thread2 > Thread2 That's

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
The program you attached worked perfectly for me. You need to 'fflush(stdout);' after each 'printf'. You didn't expect perfect alternation did you? That's totally unrealistic. You cannot use the scheduler as a synchronization mechanism. -- Thread1 Thread1 Thread2 Thread1 Thread1

RE: accept

2001-02-04 Thread David Schwartz
> What does it typically mean when accept returns 0 > and that the perror outputs "Interupted system call"?? Since 'accept' returning zero is not an error, the results of 'perror' are meaningless. Please read the manual page for 'accept' and notice that it says, "The call returns -1 on

RE: accept

2001-02-04 Thread David Schwartz
What does it typically mean when accept returns 0 and that the perror outputs "Interupted system call"?? Since 'accept' returning zero is not an error, the results of 'perror' are meaningless. Please read the manual page for 'accept' and notice that it says, "The call returns -1 on

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
The program you attached worked perfectly for me. You need to 'fflush(stdout);' after each 'printf'. You didn't expect perfect alternation did you? That's totally unrealistic. You cannot use the scheduler as a synchronization mechanism. -- Thread1 Thread1 Thread2 Thread1 Thread1

RE: accept

2001-02-04 Thread David Schwartz
Ok, but fd 0 cant be a valid socket since its the stdin Wrong. fd 0 can be a valid socket. Read the man page to 'accept' again. Remember again that zero is a non-negative integer. I posted that on this mailing list coz I thought that this might be a scaling problem since it happens

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
What version of Linux are you using ? What I see is the following: I'm using 2.4.1-pre10, glibc 2.1.3. Thread1 Thread1 Thread1 Thread1 Thread1 Thread2 Thread2 Thread2 Thread2 Thread2 That's totally

RE: hotmail not dealing with ECN

2001-01-27 Thread David Schwartz
> On Sat, Jan 27, 2001 at 02:18:31PM -0800, David Schwartz wrote: > > > Firewalling should be implemented on the hosts, perhaps with > > > centralized > > > policy management. In such a situation, there would be no > > > reason to filter > > >

RE: hotmail not dealing with ECN

2001-01-27 Thread David Schwartz
> Firewalling should be implemented on the hosts, perhaps with centralized > policy management. In such a situation, there would be no reason to filter > on funny IP options. That's madness. If you have to implement your firewalling on every host, what do you do when someone wants to

RE: hotmail not dealing with ECN

2001-01-27 Thread David Schwartz
Firewalling should be implemented on the hosts, perhaps with centralized policy management. In such a situation, there would be no reason to filter on funny IP options. That's madness. If you have to implement your firewalling on every host, what do you do when someone wants to run a

RE: hotmail not dealing with ECN

2001-01-27 Thread David Schwartz
On Sat, Jan 27, 2001 at 02:18:31PM -0800, David Schwartz wrote: Firewalling should be implemented on the hosts, perhaps with centralized policy management. In such a situation, there would be no reason to filter on funny IP options. That's madness. If you have to implement

RE: Question: Memory change request

2001-01-24 Thread David Schwartz
> mprotect the page(s) you are interested in so you can't write to them > and catch SEGV -- when someone attempts to write you can pull apart > the stack frame mark the page(s) RO and continue. > > if you are really stuck i think i have example code to do this > somewhere for ia32 (stack frame

RE: Question: Memory change request

2001-01-24 Thread David Schwartz
mprotect the page(s) you are interested in so you can't write to them and catch SEGV -- when someone attempts to write you can pull apart the stack frame mark the page(s) RO and continue. if you are really stuck i think i have example code to do this somewhere for ia32 (stack frame is

RE: Is sendfile all that sexy?

2001-01-20 Thread David Schwartz
> I'm _not_ seeing the point for a high-performance link to have a generic > packet buffer. > > Linus Well suppose your RAID controller can take over control of disks distributed throughout your I/O subsystem. If you assume the bandwidth of the I/O subsystem is not the

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-20 Thread David Schwartz
> ...and I still don't understand why the identical program, but using one > socket instead of 2 sockets, IS CPU bound, and gets on the order of > 10K/sec. on the same HW. Diffs to produce 10K/sec. 1 socket version from > my previous sample follow... It's really this simple -- this

RE: Is sendfile all that sexy?

2001-01-20 Thread David Schwartz
I'm _not_ seeing the point for a high-performance link to have a generic packet buffer. Linus Well suppose your RAID controller can take over control of disks distributed throughout your I/O subsystem. If you assume the bandwidth of the I/O subsystem is not the

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-20 Thread David Schwartz
...and I still don't understand why the identical program, but using one socket instead of 2 sockets, IS CPU bound, and gets on the order of 10K/sec. on the same HW. Diffs to produce 10K/sec. 1 socket version from my previous sample follow... It's really this simple -- this isn't

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-19 Thread David Schwartz
and > > > data becomes available, it doesn't return until the next clock tick. > > David Schwartz wrote: > > This program doesn't demonstrate anything except that > > Linux's sleep time is > > granular. This shouldn't be news to anyone. If you don't

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-19 Thread David Schwartz
> If select() is waiting for data to become available on a > TCP socket FD, and > data becomes available, it doesn't return until the next clock tick. If your application has scheduling requirements, you need to communicate them to the scheduler. > #include > #include >

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-19 Thread David Schwartz
If select() is waiting for data to become available on a TCP socket FD, and data becomes available, it doesn't return until the next clock tick. If your application has scheduling requirements, you need to communicate them to the scheduler. #include sys/time.h #include

RE: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

2001-01-19 Thread David Schwartz
return until the next clock tick. David Schwartz wrote: This program doesn't demonstrate anything except that Linux's sleep time is granular. This shouldn't be news to anyone. If you don't force a reschedule, everything works the way it's supposed to: The sample program you included

RE: Poll and Select not scaling

2001-01-11 Thread David Schwartz
> I have been trying to increase the scalabilty of an email server that has > been ported to Linux. It was originally written for Netware, and there we > are able to provide over 30,000 connections at any given time. On Linux > however select stops working after the first 1024 connections. I

RE: Poll and Select not scaling

2001-01-11 Thread David Schwartz
I have been trying to increase the scalabilty of an email server that has been ported to Linux. It was originally written for Netware, and there we are able to provide over 30,000 connections at any given time. On Linux however select stops working after the first 1024 connections. I have

RE: Shared memory not enabled in 2.4.0?

2001-01-08 Thread David Schwartz
> For some reason shared memory is not being enabled on my system > running kernel > v2.4.0 (on RedHat v6.2, with all updates applied). You are confusing System V shared memory (IPC) with VM shared memory. The '0' for shared in /proc/meminfo means the system can't easily tell you how

RE: Shared memory not enabled in 2.4.0?

2001-01-08 Thread David Schwartz
For some reason shared memory is not being enabled on my system running kernel v2.4.0 (on RedHat v6.2, with all updates applied). You are confusing System V shared memory (IPC) with VM shared memory. The '0' for shared in /proc/meminfo means the system can't easily tell you how much

RE: Which resource is temporarily unavailable

2000-12-28 Thread David Schwartz
> zsh: fork failed: resource temporarily unavailable > > on a machine. It has 510 processes which are mostly > asleep, running under various user ids. > How do I determine which resource is the problem so I can > fix the shortage? Sounds like processes/tasks is the resource in

RE: Which resource is temporarily unavailable

2000-12-28 Thread David Schwartz
zsh: fork failed: resource temporarily unavailable on a machine. It has 510 processes which are mostly asleep, running under various user ids. How do I determine which resource is the problem so I can fix the shortage? Sounds like processes/tasks is the resource in question.

RE: TCP keepalive seems to send to only one port

2000-12-25 Thread David Schwartz
Cesar Barros wrote: > On Mon, Dec 25, 2000 at 04:33:07PM -0800, David Schwartz wrote: > > If the administrator of the NAT meant for you to have a > > permanent mapping, > > she would have put one there. Using keepalives to hold a NAT entry open > > indefini

RE: TCP keepalive seems to send to only one port

2000-12-25 Thread David Schwartz
> On Sat, Dec 23, 2000 at 04:19:31PM -0800, David Schwartz wrote: > > > This means that keepalive is useless for keeping alive more than > > > one connection > > > to a given host. > > Actually, keepalive is useless for keeping connections > > ali

RE: TCP keepalive seems to send to only one port

2000-12-25 Thread David Schwartz
On Sat, Dec 23, 2000 at 04:19:31PM -0800, David Schwartz wrote: This means that keepalive is useless for keeping alive more than one connection to a given host. Actually, keepalive is useless for keeping connections alive anyway. It's very badly named. It's purpose

RE: TCP keepalive seems to send to only one port

2000-12-25 Thread David Schwartz
Cesar Barros wrote: On Mon, Dec 25, 2000 at 04:33:07PM -0800, David Schwartz wrote: If the administrator of the NAT meant for you to have a permanent mapping, she would have put one there. Using keepalives to hold a NAT entry open indefinitely without activity would be considered

RE: TCP keepalive seems to send to only one port

2000-12-23 Thread David Schwartz
> This means that keepalive is useless for keeping alive more than > one connection > to a given host. Actually, keepalive is useless for keeping connections alive anyway. It's very badly named. It's purpose is to detect dead peers, not keep peers alive. DS - To unsubscribe

RE: TCP keepalive seems to send to only one port

2000-12-23 Thread David Schwartz
This means that keepalive is useless for keeping alive more than one connection to a given host. Actually, keepalive is useless for keeping connections alive anyway. It's very badly named. It's purpose is to detect dead peers, not keep peers alive. DS - To unsubscribe from

RE: /dev/random: really secure?

2000-12-18 Thread David Schwartz
> David Schwartz wrote: > > The code does its best to estimate how much actual entropy it > > is gathering. > A potential weakness. The entropy estimator can be manipulated by > feeding data which looks random to the estimator, but which is in fact > not ra

RE: /dev/random: really secure?

2000-12-18 Thread David Schwartz
David Schwartz wrote: The code does its best to estimate how much actual entropy it is gathering. A potential weakness. The entropy estimator can be manipulated by feeding data which looks random to the estimator, but which is in fact not random at all. -- Jamie Sort

RE: /dev/random: really secure?

2000-12-17 Thread David Schwartz
> I noticed peculiarities in the behaviour of the delta-delta-3 system for > entropy estimation in the random.c code./ When I hold right alt > or control, I > get about 8 bits of entropy per repeat fro the /dev/random which is > overestimated. I think the real entropy is 0 bits because it is

RE: /dev/random: really secure?

2000-12-17 Thread David Schwartz
I noticed peculiarities in the behaviour of the delta-delta-3 system for entropy estimation in the random.c code./ When I hold right alt or control, I get about 8 bits of entropy per repeat fro the /dev/random which is overestimated. I think the real entropy is 0 bits because it is

RE: out of swap

2000-11-27 Thread David Schwartz
> Last night I was browsing the web and I came across a page with > LOTS of images. There were so many that it drove my swap space > to ZERO. I still had 3 Meg of memory, but the system became > virtually unusable and SLOW. (there were over 150 x 30k+ images > on one page). > > Is this

RE: out of swap

2000-11-27 Thread David Schwartz
Last night I was browsing the web and I came across a page with LOTS of images. There were so many that it drove my swap space to ZERO. I still had 3 Meg of memory, but the system became virtually unusable and SLOW. (there were over 150 x 30k+ images on one page). Is this something that

RE: uname

2000-11-22 Thread David Schwartz
> Little question about 'uname'. Does it read data from kernel, /proc or > get its data from other source ? 'strace' was made to answer questions like this. DS - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

RE: uname

2000-11-22 Thread David Schwartz
Little question about 'uname'. Does it read data from kernel, /proc or get its data from other source ? 'strace' was made to answer questions like this. DS - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED]

Strange thing (/dev/random)

2000-11-21 Thread David Schwartz
I noticed something odd with the entropy pool in 2.4.0-test11. If a normal user does a 'sysctl -A', the entropy pool empties. I'm not sure why, but it sounds like this isn't a good thing from a security standpoint. DS - To unsubscribe from this list: send the line "unsubscribe

RE: What protects f_pos?

2000-11-12 Thread David Schwartz
> [EMAIL PROTECTED] writes: > > This looks like it's a bug to me although if you have multiple > > threads hitting a file descriptor at the same time, you're pretty much > > asking for trouble. > > Yes, I haven't been able to come up with an example that might trigger > this that wasn't

RE: What protects f_pos?

2000-11-12 Thread David Schwartz
[EMAIL PROTECTED] writes: This looks like it's a bug to me although if you have multiple threads hitting a file descriptor at the same time, you're pretty much asking for trouble. Yes, I haven't been able to come up with an example that might trigger this that wasn't dubious to

RE: national problems

2000-11-08 Thread David Schwartz
> Now that it seems that George Bush has won the presidency, I am wondering > whether Linus and other members of the free software community intend to > leave the U.S. and go to more friendly places. Imagine what G.W. Bush is > going to do to export controls, free software, copyright law,

RE: national problems

2000-11-08 Thread David Schwartz
Now that it seems that George Bush has won the presidency, I am wondering whether Linus and other members of the free software community intend to leave the U.S. and go to more friendly places. Imagine what G.W. Bush is going to do to export controls, free software, copyright law, patent

RE: malloc(1/0) ??

2000-11-07 Thread David Schwartz
> This way all should work. However someone mentioned that the returns > from "malloc" should be unique. Why would that be? That would prohibit > my "1" trick. The statement implies you want to go about checking > pointers for equality. If for example you have a memcmp (a, b) that > has "if (a

RE: malloc(1/0) ??

2000-11-07 Thread David Schwartz
> > The program can't possibly work because it invokes undefined > behavior. It > > is impossible to determine what a program that invokes > undefined behavior is > > 'supposed to do'. > > I dont think it's undefined behaviour ... You are correct. This is bahavior that is undefined by

RE: malloc(1/0) ??

2000-11-07 Thread David Schwartz
This way all should work. However someone mentioned that the returns from "malloc" should be unique. Why would that be? That would prohibit my "1" trick. The statement implies you want to go about checking pointers for equality. If for example you have a memcmp (a, b) that has "if (a == b)

RE: malloc(1/0) ??

2000-11-06 Thread David Schwartz
> hi, > why does this program works. when executed, it doesnt > give a segmentation fault. when the program requests > memory, is a standard chunk is allocated irrespective > of the what the user specifies. please explain. > > main() > { >char *s; >s = (char*)malloc(0); >

RE: malloc(1/0) ??

2000-11-06 Thread David Schwartz
> From: "Dan Kegel" <[EMAIL PROTECTED]> > > [EMAIL PROTECTED] asked: > > > [Why does this program not crash?] > > > > > > main() > > > { > > >char *s; > > >s = (char*)malloc(0); > > >strcpy(s,"f"); > > >printf("%s\n",s); > > > } > > > > It doesn't crash because the standard

RE: GPL Question

2000-10-27 Thread David Schwartz
> Now, if a module is loaded that registers a set of functions that have > increased functionality compared to the original functions, if that > modules is not based off GPL'd code, must the source code of that module > be released under the GPL? If the answer to this is "yes", then

RE: GPL Question

2000-10-27 Thread David Schwartz
Now, if a module is loaded that registers a set of functions that have increased functionality compared to the original functions, if that modules is not based off GPL'd code, must the source code of that module be released under the GPL? If the answer to this is "yes", then

RE: kqueue microbenchmark results

2000-10-26 Thread David Schwartz
> * David Schwartz <[EMAIL PROTECTED]> [001025 15:35] wrote: > > > > If a programmer does not ever wish to block under any > circumstances, it's > > his obligation to communicate this desire to the > implementation. Otherwise, > > the implementation can bloc

RE: kqueue microbenchmark results

2000-10-26 Thread David Schwartz
* David Schwartz [EMAIL PROTECTED] [001025 15:35] wrote: If a programmer does not ever wish to block under any circumstances, it's his obligation to communicate this desire to the implementation. Otherwise, the implementation can block if it doesn't have data or an error available

RE: kqueue microbenchmark results

2000-10-25 Thread David Schwartz
> On Wed, Oct 25, 2000 at 03:11:37PM -0700, David Schwartz wrote: > > > > > Now, next time around the loop, we get a notification for an event > > > when there is no data to read. The application now must be prepared > > > to handle this case (meaning

RE: kqueue microbenchmark results

2000-10-25 Thread David Schwartz
> Now, next time around the loop, we get a notification for an event > when there is no data to read. The application now must be prepared > to handle this case (meaning no blocking read() calls can be used). > -- > Jonathan If the programmer never wants to block in a read call, he

RE: kqueue microbenchmark results

2000-10-25 Thread David Schwartz
Now, next time around the loop, we get a notification for an event when there is no data to read. The application now must be prepared to handle this case (meaning no blocking read() calls can be used). -- Jonathan If the programmer never wants to block in a read call, he should

RE: kqueue microbenchmark results

2000-10-25 Thread David Schwartz
On Wed, Oct 25, 2000 at 03:11:37PM -0700, David Schwartz wrote: Now, next time around the loop, we get a notification for an event when there is no data to read. The application now must be prepared to handle this case (meaning no blocking read() calls can be used

RE: Linux's implementation of poll() not scalable?

2000-10-23 Thread David Schwartz
> I'm trying to write a server that handles 1 clients. On 2.4.x, > the RT signal queue stuff looks like the way to achieve that. > Unfortunately, when the RT signal queue overflows, the consensus seems > to be that you fall back to a big poll(). And even though the RT signal > queue

RE: Linux's implementation of poll() not scalable?

2000-10-23 Thread David Schwartz
> Under Solaris 7, when the number of idle sockets was increased from > 100 to 1, the time to check for active sockets with poll() > increased by a factor of only 6.5. That's a sublinear increase in time, > pretty spiffy. Under Solaris 7, when the number of idle sockets was decreased from

RE: Linux's implementation of poll() not scalable?

2000-10-23 Thread David Schwartz
Under Solaris 7, when the number of idle sockets was increased from 100 to 1, the time to check for active sockets with poll() increased by a factor of only 6.5. That's a sublinear increase in time, pretty spiffy. Under Solaris 7, when the number of idle sockets was decreased from

RE: Linux's implementation of poll() not scalable?

2000-10-23 Thread David Schwartz
I'm trying to write a server that handles 1 clients. On 2.4.x, the RT signal queue stuff looks like the way to achieve that. Unfortunately, when the RT signal queue overflows, the consensus seems to be that you fall back to a big poll(). And even though the RT signal queue [almost]

RE: bind() allowed to non-local addresses

2000-10-20 Thread David Schwartz
> [EMAIL PROTECTED] said: > > There is NOT a bug in the JVM code that handles java.net.DatagramSock > > et. Don't you find it a little compelling that the nearly identical > > JVM code passes the Java Compatibility test suite on Linux 2.2, > > Solaris, HPUX, SCO, and even Windows? > > If the

RE: bind() allowed to non-local addresses

2000-10-20 Thread David Schwartz
[EMAIL PROTECTED] said: There is NOT a bug in the JVM code that handles java.net.DatagramSock et. Don't you find it a little compelling that the nearly identical JVM code passes the Java Compatibility test suite on Linux 2.2, Solaris, HPUX, SCO, and even Windows? If the JVM spec

RE: bind() allowed to non-local addresses

2000-10-19 Thread David Schwartz
> Due ot this and other reasons I'm restoring the 2.2.x behavior by > default, but adding a sysctl so that systems using dynamic addressing > may elect to get the different bind() behavior. > > Later, > David S. Miller > [EMAIL PROTECTED] If a system uses dynamic addressing, binding to

RE: bind() allowed to non-local addresses

2000-10-19 Thread David Schwartz
Due ot this and other reasons I'm restoring the 2.2.x behavior by default, but adding a sysctl so that systems using dynamic addressing may elect to get the different bind() behavior. Later, David S. Miller [EMAIL PROTECTED] If a system uses dynamic addressing, binding to an IP

RE: bind() allowed to non-local addresses

2000-10-18 Thread David Schwartz
> The XNS specification seems loose enough to allow the Linux > behaviour. I don't > think we should however adopt it as default behaviour. Programs > that dont care > about addresses use INADDR_ANY. > > Alan I worry that an application may use ability to bind to determine whether an

RE: bind() allowed to non-local addresses

2000-10-18 Thread David Schwartz
The XNS specification seems loose enough to allow the Linux behaviour. I don't think we should however adopt it as default behaviour. Programs that dont care about addresses use INADDR_ANY. Alan I worry that an application may use ability to bind to determine whether an address

RE: Tux 2 patents

2000-10-06 Thread David Schwartz
> I've filed lots of patents in my day Marty -- this is correct. I have > two patent lawyers on staff. Want to try again.. > > Jeff > > And you only get the year of protection **IF** you have filed a > > provisional patent application, which expires 12 months after it's > > issued. You must

RE: Tux 2 patents

2000-10-06 Thread David Schwartz
I've filed lots of patents in my day Marty -- this is correct. I have two patent lawyers on staff. Want to try again.. Jeff And you only get the year of protection **IF** you have filed a provisional patent application, which expires 12 months after it's issued. You must then file

RE: thread rant

2000-09-04 Thread David Schwartz
> I've heard comments from Alan, and others in the past bashing > threads, and I can understand the "threads are for people who > can't write state machines" comments I've heard, but what other > ways are there of accomplishing the goals that threads solve in > an acceptable manner that gives

RE: thread rant

2000-09-04 Thread David Schwartz
I've heard comments from Alan, and others in the past bashing threads, and I can understand the "threads are for people who can't write state machines" comments I've heard, but what other ways are there of accomplishing the goals that threads solve in an acceptable manner that gives good

RE: thread group comments

2000-09-01 Thread David Schwartz
> 3rd Problem: one uid/gid process-wide > > All the ID (uid/guid/euid/egid/...) must be process wide. The problem > is similar to the signal handler. I think one should again keep the > information exclusively in the master thread and have all others refer > to this information. Other

RE: thread group comments

2000-09-01 Thread David Schwartz
3rd Problem: one uid/gid process-wide All the ID (uid/guid/euid/egid/...) must be process wide. The problem is similar to the signal handler. I think one should again keep the information exclusively in the master thread and have all others refer to this information. Other than

<    2   3   4   5   6   7