From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1739 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: build musl with clang Date: Fri, 24 Aug 2012 13:52:51 -0400 Message-ID: <20120824175251.GF27715@brightrain.aerifal.cx> References: <5035E16E.50004@gmail.com> <20120823122414.GM27715@brightrain.aerifal.cx> <50362C19.5080509@gmail.com> <20120823175545.GQ27715@brightrain.aerifal.cx> <5037BBED.4050509@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345830676 16421 80.91.229.3 (24 Aug 2012 17:51:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 17:51:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1740-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 24 19:51:17 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T4y2N-00066q-Jq for gllmg-musl@plane.gmane.org; Fri, 24 Aug 2012 19:51:15 +0200 Original-Received: (qmail 3471 invoked by uid 550); 24 Aug 2012 17:51:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3461 invoked from network); 24 Aug 2012 17:51:13 -0000 Content-Disposition: inline In-Reply-To: <5037BBED.4050509@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1739 Archived-At: On Fri, Aug 24, 2012 at 07:37:49PM +0200, Luca Barbato wrote: > On 8/23/12 7:55 PM, Rich Felker wrote: > >for (i=0; i > > >I am not willing to remove the if, because it serves a valuable > >purpose: it avoids writing to pages that are already all-zero, which > >in turn reduces swap pressure/dirty pages. > > Are you sure absolutely sure it does have the intended effect? Yes. And actually the problematic code is not that, but the [-1] index to inspect whether the chunk was obtained from the heap or via mmap. In the latter case, no zeroing is needed whatsoever. Rich