Req #50333 [Asn->Csd]: [PATCH] - Improving multi-threaded scalability by using emalloc/efree/estrdup
Edit report at https://bugs.php.net/bug.php?id=50333&edit=1
ID: 50333
Updated by: ab@php.net
Reported by: yoarvi at gmail dot com
Summary: [PATCH] - Improving multi-threaded scalability by
using emalloc/efree/estrdup
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: Solaris 5.10 (SPARC)
PHP Version: 6SVN-2009-11-30 (SVN)
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
the pull request merged
Previous Comments:
------------------------------------------------------------------------
[2013-10-14 13:51:12] pajoye@php.net
@a will review/update the patch.
We will then run all required tests before applying it to master (discussed with Dmitry too).
------------------------------------------------------------------------
[2009-11-30 12:45:15] yoarvi at gmail dot com
Description:
------------
Using malloc/free in a multi-threaded process limits its scalability
because of the process-wide lock inside malloc/free. The scalability
of the PHP engine in a multi-threaded process can be improved by
reducing the use of malloc/free/strdup and instead using
emalloc/efree/estrdup wherever possible (at least in the main request
processing code paths).
The code paths in TSRM/tsrm_virtual_cwd.c are invoked quite frequently
and they use malloc/free/strdup. I'd like to submit the following
patches (based on the PHP6 source tree) for review that incorporate
the use of emalloc/efree/estrdup in the virtual_cwd code paths. In
order to use emalloc/efree I had to relocate tsrm_virtual_cwd.c from
the TSRM directory to the Zend directory. I've split the change into 3
patches in order to make the changes easy to see
Avoid name clash between global and local variable
(http://bugs.php.net/bug.php?id=50101)
http://bitbucket.org/arvi/arviq/src/tip/arvi-08-namespace
Rename TSRM/tsrm_virtual_cwd.[ch] to Zend/zend_virtual_cwd.[ch]
http://bitbucket.org/arvi/arviq/src/tip/arvi-08-virtual_cwd
Replace malloc/free/strdup with emalloc/efree/estrdup
http://bitbucket.org/arvi/arviq/src/tip/arvi-08-virtual_cwd-emalloc
[http://marc.info/?l=php-internals&m=125846494007872&w=2]
Expected result:
----------------
Improved scalability on multi-threaded/multi-core systems.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50333&edit=1
Thread (3 messages)