From owner-freebsd-questions@FreeBSD.ORG Sat Apr 22 12:38:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E93D16A402 for ; Sat, 22 Apr 2006 12:38:13 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CD5043D46 for ; Sat, 22 Apr 2006 12:38:13 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 5750B5ED8; Sat, 22 Apr 2006 08:38:12 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jl84iUWsWX2T; Sat, 22 Apr 2006 08:38:09 -0400 (EDT) Received: from [192.168.1.3] (pool-68-160-235-217.ny325.east.verizon.net [68.160.235.217]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 39AC05C82; Sat, 22 Apr 2006 08:38:09 -0400 (EDT) Message-ID: <444A23BB.9080806@mac.com> Date: Sat, 22 Apr 2006 08:38:19 -0400 From: Chuck Swiger User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Peter References: <20060422005629.41158.qmail@web60014.mail.yahoo.com> In-Reply-To: <20060422005629.41158.qmail@web60014.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions Subject: Re: anyone understand torvald's critique of freebsd? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2006 12:38:13 -0000 Peter wrote: > Does anyone here understand Linus Torvald's recent comments on FreeBSD? > > http://bsdnews.com/view_story.php3?story_id=5735 Sure. There are different ways of moving data between the kernel and userland; the classic mechanism involves copying data from a wired-down page in kernel space allocated to network memory buffers to a userland page via copyin() and copyout() (or equivalents). Mach (and apparently the ZERO_COPY_SOCKETS option to FreeBSD) manipulate the VM page table mappings to make that page visible in the process address space rather than copying the sequence of bytes manually via a message-passing paradigm. The former approach tends to be more efficient for small amounts of data, especially for things smaller than one page of memory (ie, all non-jumbo network traffic); the latter approach tends to better for things which are bigger in size. The Mach VM has more overhead to its operations because the VMOs are more complicated to work and a given workload will result in comparatively larger VMO datastructures than the less-complicated approaches to doing VM. On the other hand, Mach was the first or among the earliest platforms to support shared libraries, dynamic loading of objects into user processes (dlopen vs. dso) and into the kernel, and has somewhat better scaling in the face of gigabytes of RAM and VM usage than most Unix flavors do (outside of Solaris, although FreeBSD is pretty decent nowadays too). Mach handles mapping shared libraries into VM via a technique called prebinding that can minimize the work and memory overhead required for runtime symbol relocation, which tends to big win if you are running a lot of, say, Java or Perl processes that make extensive use of runtime class-loading, yet is flexible enough to deal with collisions if needed (whereas the older fixed-VM shared libraries were subject to evil nasty conflicts if your data segment grew too big and overlapped a library's chosen address space, or if two libraries wanted to be mapped into the same spot). -- -Chuck