Hi Rasmus,

Rasmus Lerdorf wrote:
Dmitry Stogov wrote:
Hi Lucas,

I took a look into patch and I still don't like it.
I may miss some things and make mistakes so correct me if I'm wrong.

1) It makes some slowdown for all SAPIs except Apache1, because it adds
additional block/unblock code (mainly in zend_alloc.c)

This is the part that has never made sense to me. If we don't need to block signals in zend_alloc, remove those HANDLE_[UN]BLOCK_INTERRUPTIONS macros. And since these are a NOP for all but the Apache1 SAPI, either all other sapis are broken, or these are not needed at all.

It is a question. Of course this block/unblock code prevents staying the heap in inconsistent state which can cause SIGSEGV later and new code must be safer, but slower. :(

If we remove all HANDLE_[UN]BLOCK_INTERRUPTIONS we don't need this patch at all. :)

2) It makes ~10 additional syscalls on each request. I didn't get why do
you save original handlers in MINIT and set new handlers in RINIT. In
general they can be changed between MINIT and RINIT by other apache
module or web server so they should be saved/set in RINIT, but from
performance point of view it might be better to save/set signals in MINIT.

One of the issues here is that Apache sets its own signals after calling all the MINIT hooks. So saving the signals in the MINIT doesn't work. It has to be in the RINIT, but it could theoretically be done just on the first request although there are issue with that too. None of this is pretty, but completely ignoring all our signal issues doesn't seem like a good idea either.

First request is a good idea.

Thanks. Dmitry.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to