Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932129Ab0DPMXb (ORCPT ); Fri, 16 Apr 2010 08:23:31 -0400 Received: from DMZ-MAILSEC-SCANNER-3.MIT.EDU ([18.9.25.14]:63056 "EHLO dmz-mailsec-scanner-3.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758369Ab0DPMXX convert rfc822-to-8bit (ORCPT ); Fri, 16 Apr 2010 08:23:23 -0400 X-AuditID: 1209190e-b7b82ae000005260-c6-4bc856ba7c5b Subject: Re: Downsides to madvise/fadvise(willneed) for application startup Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Theodore Tso In-Reply-To: <87vdbr8vzv.fsf@basil.nowhere.org> Date: Fri, 16 Apr 2010 08:23:17 -0400 Cc: Zan Lynx , Andrew Morton , Taras Glek , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <9BEF5F2C-8AF3-480A-B382-41B0D331DE7D@mit.edu> References: <4BBA6776.5060804@mozilla.com> <20100415155309.2649a29b.akpm@linux-foundation.org> <4BC79F75.2090704@acm.org> <87vdbr8vzv.fsf@basil.nowhere.org> To: Andi Kleen X-Mailer: Apple Mail (2.1078) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1355 Lines: 28 On Apr 16, 2010, at 7:41 AM, Andi Kleen wrote: > Zan Lynx writes: > >> On 4/15/10 4:53 PM, Andrew Morton wrote: >> >>> This just isn't an interesting case. World-wide, the number of people >>> who compile their own web browser and execute it from the file which ld >>> produced is, umm, seven. >> >> Gentoo users? Linux From Scratch? > > "make install" tends to copy. I am not aware of any Makefiles > that link directly to /usr/bin, and usually that wouldn't work > anyways because of permissions. copy fixes the problem. ... and those people who are executing the binary out of the build directory are probably running the regression test (i.e., "make; make check") and on most developer machines, if they're lucky they have enough memory that the executable will still be in their page cache. :-) This being said, on modern file systems (i.e., btrfs, ext4, xfs, et. al), delayed allocation should mostly hide this problem; and if not, and the linker can estimate in advance how big the resulting binary will be, it could be modified to use the fallocate(2) system call. -- Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/