[naviserver-devel] help with driver thread

2006-01-06 Thread Zoran Vasiljevic
Hi, I have some trouble understanding the code from driver.c below. This is used in both Driver and SpoolerThread code: /* * Attempt to queue any pending connection * after reversing the list to ensure oldest * connections are tried first. */

Re: [naviserver-devel] task backport?

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 20:18 schrieb Stephen Deasey: On 1/6/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: Am 04.01.2006 um 20:40 schrieb Stephen Deasey: On 1/4/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I believe poll can be used on any file descriptor, not only sockets. It doesn't work

Re: [naviserver-devel] task backport?

2006-01-06 Thread Gustaf Neumann
Make sure you've read the C10K page: http://www.kegel.com/c10k.html you might want to check lighthttp with its benchmarks, it tried a lot to improve throughput based on the c10k tipps, including epoll for linux. it is at least a nice reference. http://www.lighttpd.net/ -gustaf

Re: [naviserver-devel] task backport?

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 20:18 schrieb Stephen Deasey: Don't believe everything you read. Man pages are often little more than hopes and dreams... LOL! In practice poll() does not work with files backed by disk. Even the Open Group specifies that "Regular files always poll TRUE for reading and wri

Re: [naviserver-devel] task backport?

2006-01-06 Thread Stephen Deasey
On 1/6/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: > > Am 04.01.2006 um 20:40 schrieb Stephen Deasey: > > > On 1/4/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > >> I believe poll can be used on any file descriptor, not only sockets. > >> > > > > It doesn't work if the file descriptor is backed

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Vlad Seryakov
sockPtr will be queued into the connection queue for processing, it may happen from driver thread or from spooler thread, works equally. Zoran Vasiljevic wrote: Am 06.01.2006 um 18:25 schrieb Vlad Seryakov: It is already fixed in the last uploaded driver.c, it works good now one question:

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 18:25 schrieb Vlad Seryakov: It is already fixed in the last uploaded driver.c, it works good now one question: what happens if the: sockPtr->keep = 0; if (sockPtr->drvPtr->opts & NS_DRIVER_ASYNC) { n = SockRead(sockPtr, 1)

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Vlad Seryakov
It is already fixed in the last uploaded driver.c, it works good now Zoran Vasiljevic wrote: Am 06.01.2006 um 17:46 schrieb Vlad Seryakov: There are a lot of options here actually like: - confg option to enable/disable spooling I do not think this is needed. I'd enable it all the time. Or

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 17:46 schrieb Vlad Seryakov: There are a lot of options here actually like: - confg option to enable/disable spooling I do not think this is needed. I'd enable it all the time. Or perhaps, if we make it configurable (see below) a 0 count of spooler threads disables the functi

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Vlad Seryakov
I examined the patch in the RFE and it seems to me (not sure though) that you have more/less duplicated the driver thread processing. So, we'd have just ONE spool thread collecting data from sockets and not a spool-thread PER socket? Yes, it is smaller replica of the driver thread because it doe

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Vlad Seryakov
I uploaded driver.c into SFE, it needs more testing because after my last corrections and cleanups it seems i broke something. Zoran Vasiljevic wrote: Am 04.01.2006 um 16:15 schrieb Vlad Seryakov: The main reason to reuse driver.c is that spooler is alsmost identical to driver thread, and

Re: [naviserver-devel] Upload Progress

2006-01-06 Thread Zoran Vasiljevic
Am 04.01.2006 um 16:15 schrieb Vlad Seryakov: The main reason to reuse driver.c is that spooler is alsmost identical to driver thread, and uses the same functions as driver. Spooler can be disabled(config option), in this case driver works as usual. Also it does parsing and other Sock rel

Re: [naviserver-devel] task backport?

2006-01-06 Thread Zoran Vasiljevic
Am 04.01.2006 um 20:40 schrieb Stephen Deasey: On 1/4/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I believe poll can be used on any file descriptor, not only sockets. It doesn't work if the file descriptor is backed by a file on disk. If it did, we wouldn't have to talk about aio_read()

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd conn.c,1.23,1.24

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 08:25 schrieb Stephen Deasey: Don't forget to run make test before you commit... ns_conn-1.2 basic syntax: wrong argument FAILED Ah... Zoran