From owner-freebsd-hackers@FreeBSD.ORG Tue May 2 18:19:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9881316A53A for ; Tue, 2 May 2006 18:19:26 +0000 (UTC) (envelope-from bharmaji@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45E5643D6A for ; Tue, 2 May 2006 18:19:22 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: by nz-out-0102.google.com with SMTP id 12so1618036nzp for ; Tue, 02 May 2006 11:19:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=HLJ/QO2SCnn5Z+iCpyJlekHP5bFt1yrVwGLdpQFzAuYZ52HRvLsGl5t8RY2xM7RyBAebpf74j5G9qy7wiGteKRken/wSlMLNdQmBGQxr0sDci0/BuzpSmn1NhuXaLHp0w6XizqRWW3uHr2JByYZYXC7kIFtG7G20MRZorwX2jYE= Received: by 10.64.53.8 with SMTP id b8mr635663qba; Tue, 02 May 2006 11:19:21 -0700 (PDT) Received: by 10.65.132.5 with HTTP; Tue, 2 May 2006 11:19:21 -0700 (PDT) Message-ID: <67beabb0605021119y5770cd3al55e2c875c84589b@mail.gmail.com> Date: Tue, 2 May 2006 11:19:21 -0700 From: "Bharma Ji" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: memory allocation / deallocation within the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2006 18:19:29 -0000 I am trying to understand the impact of memory allocation / deallocation within the kernel. As I understand a) Kernel memory is not pageable ie the one you get from using kernel malloc(there may be exceptions) b) Does this imply that if I have 1 GB of RAM - then I cannot reserve more than 1 GB of kernel virtual address space? The reason is that if at any point of time, the kernel has to allocate all of its virtual address space i.e. if it needs to allocate more than 1 GB of address space, there won't b= e any physical RAM memory to allocate from and thus this scenario is not allowed as a configuration? c) Another scenario is that assume that the kernel has 512 MB of virtual address space with 1 GB of RAM. Now assume that the entire 1 GB of RAM is used up by the kernel and other userland process that are running - with th= e kernel taking 256 MB and the rest allocated to the processes. Now if the kernel needs to allocate more memory, will some of the processes be swapped out to make way for the kernel(since the kernel can take upto 512 MB) Thanks for any answers. Any URL / literature that explains this will also b= e appreciated.