Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 69498 invoked from network); 25 Feb 2009 16:54:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2009 16:54:33 -0000 Received: (qmail 23071 invoked by uid 500); 25 Feb 2009 16:54:30 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 22892 invoked by uid 500); 25 Feb 2009 16:54:30 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 22881 invoked by uid 99); 25 Feb 2009 16:54:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2009 08:54:29 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.191.128.81] (HELO mxout2.iskon.hr) (213.191.128.81) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Feb 2009 16:54:20 +0000 Received: (qmail 7627 invoked from network); 25 Feb 2009 17:53:58 +0100 X-Remote-IP: 213.191.142.122 Received: from unknown (HELO mx.iskon.hr) (213.191.142.122) by mxout2.iskon.hr with SMTP; 25 Feb 2009 17:53:58 +0100 Received: (qmail 12220 invoked from network); 25 Feb 2009 17:53:58 +0100 X-AVScan: ClamAV X-Remote-IP: 89.164.26.16 Received: from 26-16.dsl.iskon.hr (HELO mturk.csb) (89.164.26.16) by mx.iskon.hr with SMTP; 25 Feb 2009 17:53:58 +0100 Message-ID: <49A577A6.7010707@apache.org> Date: Wed, 25 Feb 2009 17:53:58 +0100 From: Mladen Turk User-Agent: Thunderbird 2.0.0.17 (X11/20080915) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r745898 - in /tomcat/connectors/trunk/jk: native/iis/jk_isapi_plugin.c xdocs/miscellaneous/changelog.xml References: <20090219152848.EEA8D2388870@eris.apache.org> <49A53CA6.3080205@kippdata.de> <49A53FEB.30707@apache.org> <49A546F3.1050004@kippdata.de> In-Reply-To: <49A546F3.1050004@kippdata.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Rainer Jung wrote: > On 25.02.2009 13:56, Mladen Turk wrote: >> Rainer Jung wrote: >>> On 19.02.2009 16:28, mturk@apache.org wrote: >>>> Author: mturk >>>> Date: Thu Feb 19 15:28:47 2009 >>>> New Revision: 745898 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=745898&view=rev >>>> Log: >>>> Update uriworkermap on watchog interval >>>> >>>> Modified: >>>> tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c >>>> tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml >>>> >>>> Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c >>>> URL: >>>> http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=745898&r1=745897&r2=745898&view=diff >>>> >>>> >>>> ============================================================================== >>>> >>>> >>>> --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) >>>> +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Thu Feb >>>> 19 15:28:47 2009 >>>> @@ -2377,6 +2377,11 @@ >>>> jk_log(logger, JK_LOG_DEBUG, >>>> "Watchdog thread running"); >>>> } >>>> + if (worker_mount_file[0]) { >>>> + jk_shm_lock(); >>>> + uri_worker_map_update(uw_map, 0, logger); >>>> + jk_shm_unlock(); >>>> + } >>> >>> Why the shm lock/unlock? The map itself has a lock that gets used. We >>> don't use the shm lock around map_uri_to_worker_ext(), which also goes >>> down to map_uri_to_worker_ext(). >>> >> >> Because IIS6+ can have multiple worker processes. >> map lock is thread lock not shared across childs. > > But do those processes share the same map? It is not in shared memory, > so each process should have it's own copy? Otherwise we would need to > consider the same for Apache 2.x. > Well, perhaps the mutex lock is not needed. I just payed safe to make sure the entire update transaction is atomic cause it happens from the watchdog thread, and jk_shm_lock() is the only api we have for that. > > Nevertheless: why is that needed for IIS? Isn't the map automatically > reloaded if needed? > Yes, but on the first request. If we have a watchdog we can do that in advance before there is an request. Regards -- ^(TM) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org