Date: Mon, 3 Nov 2008 00:22:54 +0100 From: "Ivan Voras" <ivoras@freebsd.org> To: "Ulrich Spoerlein" <uspoerlein@gmail.com> 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 Message-ID: <9bbcef730811021522l54efd4c7l8f34e6e285894aaa@mail.gmail.com> In-Reply-To: <20081102191127.GB1487@roadrunner.spoerlein.net> References: <200810301405.m9UE5wwZ053250@svn.freebsd.org> <20081102191127.GB1487@roadrunner.spoerlein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
2008/11/2 Ulrich Spoerlein <uspoerlein@gmail.com>: > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bbcef730811021522l54efd4c7l8f34e6e285894aaa>