From: Zoran V. <zv...@ar...> - 2006-01-06 10:20:47
|
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 related things like > conn queueing, making it in tasks would result in very big code > duplication just to run it in generic socket callback thread. > I think it benefits from being in driver.c, it is very specific and > does what is supposed to do. Also upload stats belongs to spooler > as well, otherwise we get another round of locking optimisation. Can you upload the entire driver.c in RFE? I would like to have a deeper look at the whole... 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? If this is true, then I believe we have a good interim solution to the upload blues. At least we can accept number of uploads at the same time and be able to query statistics. We can even invent kind of "stop-upload" bit which can be flipped by the inspector to stop the upload if needed. This can also satisfy requirements about quota enforcement etc... There will be no thread-pollution as we'll have just ONE new background thread and we'll be able to support number of uploads at the same time w/o wasting resources on the server. Cool. Cheers Zoran |