From owner-freebsd-current@FreeBSD.ORG Sat Jan 23 19:38:40 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EB68106566B; Sat, 23 Jan 2010 19:38:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5BC8FC0C; Sat, 23 Jan 2010 19:38:38 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0NJcZfl012447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jan 2010 21:38:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0NJcZif002925; Sat, 23 Jan 2010 21:38:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0NJcZg3002924; Sat, 23 Jan 2010 21:38:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jan 2010 21:38:35 +0200 From: Kostik Belousov To: Hajimu UMEMOTO Message-ID: <20100123193834.GM59590@deviant.kiev.zoral.com.ua> References: <20100119212019.GL59590@deviant.kiev.zoral.com.ua> <4B56CACF.50508@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L9+4a/fGFceRH8Zi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: attilio@freebsd.org, Gabor Kovesdan , current@freebsd.org Subject: Re: NLS/strerror efficiency X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 19:38:40 -0000 --L9+4a/fGFceRH8Zi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 24, 2010 at 04:18:48AM +0900, Hajimu UMEMOTO wrote: > Hi, >=20 > >>>>> On Wed, 20 Jan 2010 10:20:15 +0100 > >>>>> Gabor Kovesdan said: >=20 > gabor> El 2010. 01. 19. 22:20, Kostik Belousov escribi?$(D+Q: > > Hi, > > r189765 enabled NLS support for libc. Now, any strerror(3) call causes > > 4 (!) failing stat(2) calls. I think this is untolerable. > > > > Catopen() does not cache the catalog descriptor, at least for libc, > > at least for the case where the open failed. > > =20 > gabor> Hi Kostik, >=20 > gabor> thank you for pointing this out. I'll check the code to see how we= could=20 > gabor> add a caching for the failing catalogs. I'll post the patch here w= hen=20 > gabor> I'm done. >=20 > The gai_strerror(3) has same issue. How about the attached patch in > this mail? Wouldn't this cause the locale for error strings to be fixated at the time of the first strerror/gai_strerror call ? Current code, despite it inefficiency, allow dynamic change of locale that is reflected in strerror() output, I believe. --L9+4a/fGFceRH8Zi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktbUDoACgkQC3+MBN1Mb4jDgQCg8gfoCrHpPesz7cSd4mM+zSOU tZkAoIAwNUre6ZZrBuIH04Rt+EMY7iDI =jAbQ -----END PGP SIGNATURE----- --L9+4a/fGFceRH8Zi--