From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zheng Li Subject: Re: [PATCH v3 9/9] oxenstored: reduce syslog call overhead (fix typo) Date: Fri, 26 Sep 2014 16:33:32 +0100 Message-ID: <5425874C.2010203@zheng.li> References: <1411666502-23709-10-git-send-email-dev@zheng.li> <1411678822-26528-1-git-send-email-dev@zheng.li> <21541.33606.743491.572799@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XXXWa-0000E7-Su for xen-devel@lists.xenproject.org; Fri, 26 Sep 2014 15:33:36 +0000 In-Reply-To: <21541.33606.743491.572799@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Dave Scott , Joe Jin , "Luis R. Rodriguez" , Luonengjun , Fanhenglong , "Liuqiming (John)" , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 26/09/2014 16:16, Ian Jackson wrote: > Zheng Li writes ("Re: [PATCH v3 9/9] oxenstored: reduce syslog call overhead (fix typo)"): >> Setting up the TZ environment varialbe to avoid stat calls. > ... >> + if not tz_is_set then Unix.putenv "TZ" ":/etc/localtime" in > > I wasn't aware of this syntax. Can you point me to its specification ? Please see the 3rd format (:characters format) in the linked document below http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html Also a similar issue reported on stackoverflow and discussion http://stackoverflow.com/questions/4554271/how-to-avoid-excessive-stat-etc-localtime-calls-in-strftime-on-linux I've manually tested the change. With TZ set, strace no longer shows the intensive stat calls, and the timestamps seem to be correct wrt the local time setting. Cheers, Zheng