httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt child.c mpm.h
Date Thu, 11 Dec 2003 02:02:09 GMT
stoddard    2003/12/10 18:02:09

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               docs/manual/mod Tag: APACHE_2_0_BRANCH mpm_common.xml
                        mpm_winnt.xml
               server/mpm/winnt Tag: APACHE_2_0_BRANCH child.c mpm.h
  Log:
  Win32: Implement MaxMemFree directive
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.194 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.193
  retrieving revision 1.988.2.194
  diff -u -r1.988.2.193 -r1.988.2.194
  --- CHANGES	10 Dec 2003 16:48:45 -0000	1.988.2.193
  +++ CHANGES	11 Dec 2003 02:02:08 -0000	1.988.2.194
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0.49
  +  *) Win32 MPM: Implement MaxMemFree to enable setting an upper
  +     limit on the amount of storage used by the bucket brigades
  +     in each server thread. [Bill Stoddard]
   
     *) Modified the cache code to be header-location agnostic. Also
        fixed a number of other cache code bugs related to PR 15852.
  
  
  
  1.751.2.592 +2 -10     httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.591
  retrieving revision 1.751.2.592
  diff -u -r1.751.2.591 -r1.751.2.592
  --- STATUS	10 Dec 2003 23:01:00 -0000	1.751.2.591
  +++ STATUS	11 Dec 2003 02:02:08 -0000	1.751.2.592
  @@ -89,14 +89,6 @@
         http://cvs.apache.org/viewcvs/httpd-2.0/server/mpm/prefork/prefork.c.diff?r1=1.279&r2=1.280
         +1: jorton, trawick
   
  -    * Make Win32 MPM honor MaxMemFree for transaction pools
  -      server/mpm/winnt/child.c: r1.17
  -      server/mpm/winnt/mpm.h: r1.14
  -      +1: stoddard
  -      +1 (concept): trawick (looks reasonable when compared with worker)
  -      +1 (concept): jwoolley (same reason.  though why is ptrans no longer
  -                              a child pool of pchild?)
  -
       * parsed_uri.port is only valid iff parsed_uri.port_str != NULL.
         Old code simply checked if it was non-zero, not if it
         was *valid*
  @@ -345,7 +337,7 @@
       * Fix a long delay with CGI requests and keepalive connections on
         AIX.
           modules/generators/mod_cgid.c r1.159
  -      +1: trawick
  +      +1: trawick, stoddard
   
       * mod_status hook
           configure.in r1.254
  
  
  
  No                   revision
  No                   revision
  1.21.2.5  +1 -1      httpd-2.0/docs/manual/mod/mpm_common.xml
  
  Index: mpm_common.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mpm_common.xml,v
  retrieving revision 1.21.2.4
  retrieving revision 1.21.2.5
  diff -u -r1.21.2.4 -r1.21.2.5
  --- mpm_common.xml	17 May 2003 19:36:01 -0000	1.21.2.4
  +++ mpm_common.xml	11 Dec 2003 02:02:09 -0000	1.21.2.5
  @@ -387,7 +387,7 @@
   <contextlist><context>server config</context></contextlist>
   <modulelist><module>beos</module><module>leader</module>
   <module>mpm_netware</module><module>prefork</module>
  -<module>threadpool</module><module>worker</module></modulelist>
  +<module>threadpool</module><module>worker</module><module>mpm_winnt</module></modulelist>
   
   <usage>
       <p>The <directive>MaxMemFree</directive> directive sets the
  
  
  
  1.4.2.3   +2 -0      httpd-2.0/docs/manual/mod/mpm_winnt.xml
  
  Index: mpm_winnt.xml
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mpm_winnt.xml,v
  retrieving revision 1.4.2.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- mpm_winnt.xml	15 Apr 2003 22:56:40 -0000	1.4.2.2
  +++ mpm_winnt.xml	11 Dec 2003 02:02:09 -0000	1.4.2.3
  @@ -27,6 +27,8 @@
   </directivesynopsis>
   <directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
   </directivesynopsis>
  +<directivesynopsis location="mpm_common"><name>MaxMemFree</name>
  +</directivesynopsis>
   <directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
   </directivesynopsis>
   <directivesynopsis location="mpm_common"><name>SendBufferSize</name>
  
  
  
  No                   revision
  No                   revision
  1.9.2.5   +13 -5     httpd-2.0/server/mpm/winnt/child.c
  
  Index: child.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/child.c,v
  retrieving revision 1.9.2.4
  retrieving revision 1.9.2.5
  diff -u -r1.9.2.4 -r1.9.2.5
  --- child.c	23 Jun 2003 13:15:21 -0000	1.9.2.4
  +++ child.c	11 Dec 2003 02:02:09 -0000	1.9.2.5
  @@ -185,6 +185,8 @@
                    * Multiple failures in the next two steps will cause the pchild pool
                    * to 'leak' storage. I don't think this is worth fixing...
                    */
  +                apr_allocator_t *allocator;
  +
                   context = (PCOMP_CONTEXT) apr_pcalloc(pchild, sizeof(COMP_CONTEXT));
     
                   context->Overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
  @@ -196,14 +198,17 @@
                   }
    
                   /* Create the tranaction pool */
  -                if ((rv = apr_pool_create(&context->ptrans, pchild)) != APR_SUCCESS)
{
  +                apr_allocator_create(&allocator);
  +                apr_allocator_max_free_set(allocator, ap_max_mem_free);
  +                rv = apr_pool_create_ex(&context->ptrans, pchild, NULL, allocator);
  +                if (rv != APR_SUCCESS) {
                       ap_log_error(APLOG_MARK,APLOG_WARNING, rv, ap_server_conf,
                                    "mpm_get_completion_context: Failed to create the transaction
pool.");
                       CloseHandle(context->Overlapped.hEvent);
                       return NULL;
                   }
  -                apr_pool_tag(context->ptrans, "ptrans");
  - 
  +                apr_pool_tag(context->ptrans, "transaction");
  +                apr_allocator_owner_set(allocator, context->ptrans);
                   context->accept_socket = INVALID_SOCKET;
                   context->ba = apr_bucket_alloc_create(pchild);
                   apr_atomic_inc(&num_completion_contexts); 
  @@ -437,9 +442,12 @@
   
       if (context == NULL) {
           /* allocate the completion context and the transaction pool */
  +        apr_allocator_t *allocator;
           context = apr_pcalloc(pchild, sizeof(COMP_CONTEXT));
  -        apr_pool_create(&context->ptrans, pchild);
  -        apr_pool_tag(context->ptrans, "ptrans");
  +        apr_allocator_create(&allocator);
  +        apr_allocator_max_free_set(allocator, ap_max_mem_free);
  +        apr_pool_create_ex(&context->ptrans, pchild, NULL, allocator);
  +        apr_pool_tag(context->ptrans, "transaction");
           context->ba = apr_bucket_alloc_create(pchild);
       }
       
  
  
  
  1.12.2.2  +1 -0      httpd-2.0/server/mpm/winnt/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm.h,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.2
  diff -u -r1.12.2.1 -r1.12.2.2
  --- mpm.h	3 Feb 2003 17:32:06 -0000	1.12.2.1
  +++ mpm.h	11 Dec 2003 02:02:09 -0000	1.12.2.2
  @@ -72,6 +72,7 @@
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
   #define AP_MPM_WANT_SET_SCOREBOARD
  +#define AP_MPM_WANT_SET_MAX_MEM_FREE
   
   extern int ap_threads_per_child;
   extern int ap_thread_limit;
  
  
  

Mime
View raw message