From owner-svn-src-head@FreeBSD.ORG Sun Nov 2 23:22:56 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD5AF1065670; Sun, 2 Nov 2008 23:22:56 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 103D88FC08; Sun, 2 Nov 2008 23:22:55 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1901295fgb.35 for ; Sun, 02 Nov 2008 15:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=ZMFm0QkJ7bvut+cwFmUgcPSU5H7TJ45BOm0xu+gTXGg=; b=pnkR2rmKeUAAkKrw5jszNpNpJ5sLoG12SD7DZHJdhIpQA0oq/7jJtPCj0cfWusM/KK b1lPGu1ZCcOkzQ8e4v72uSO9PudfoNl8P34WYkYTvMdrN2cDQfVXhBSho7GgnWTe8aeb YXq27zSMYNZ3vClk7voDSZpLNDHxTQcMMtK14= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=wePAgCZYm5samLAkjexzrkRgVUwuqyOuiGE35eRdbkc6D/6vLrjgxVyvkdq9hHpyz5 qdwHPRwL7Sseeoffv5qAzSUv5wU7o37Qpkc3qaN23Bd+UblAmCqGo4Rac5BJVYZmEEWp YaBDcYUhap9IZcxeUACXIhydHg8NZyWfNlZVw= Received: by 10.181.59.19 with SMTP id m19mr4009405bkk.38.1225668174595; Sun, 02 Nov 2008 15:22:54 -0800 (PST) Received: by 10.181.145.4 with HTTP; Sun, 2 Nov 2008 15:22:54 -0800 (PST) Message-ID: <9bbcef730811021522l54efd4c7l8f34e6e285894aaa@mail.gmail.com> Date: Mon, 3 Nov 2008 00:22:54 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Ulrich Spoerlein" In-Reply-To: <20081102191127.GB1487@roadrunner.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200810301405.m9UE5wwZ053250@svn.freebsd.org> <20081102191127.GB1487@roadrunner.spoerlein.net> X-Google-Sender-Auth: bdcadabc77ecbd30 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184471 - in head/bin: cat cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2008 23:22:56 -0000 2008/11/2 Ulrich Spoerlein : > On Thu, 30.10.2008 at 14:05:58 +0000, Ivan Voras wrote: >> Author: ivoras >> Date: Thu Oct 30 14:05:57 2008 >> New Revision: 184471 >> URL: http://svn.freebsd.org/changeset/base/184471 >> >> Log: >> Teach cat(1) and cp(1) to use a larger buffer if enough memory is present >> in the system. A simple heuristics is used to detect what is "enough" >> memory: if number of physmem pages is greater than 32k (equalling 128 MB >> on machines with 4 kB pages). > > Hi Ivan, > > curiosity speaking: Isn't amd64 and the superpages work by alc@ making > it possible, to have pages of dynamic size, and of sizes > 1MB. If so, > how are these static (?) macros affected. I think the base page size of the architecture (which amd64 inherited from i386) will always stay at 4 kB. For architectures with bigger page size (as returned by sysconf(_SC_PAGESIZE)), it's forseeable they will have more than 32k pages of active RAM in any case so it doesn't really matter what the threshold is (assuming, of course, there will be no architectures with *smaller* page size :) ). The reason I introduced this threshold at all is to support old or embedded (small) hardware in which 1 MB could be thought of as a "big" buffer. I think 1 MB is "good enough" for all larger machines.