From owner-freebsd-ppc@FreeBSD.ORG Tue Oct 21 19:01:44 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C8A1065676 for ; Tue, 21 Oct 2008 19:01:44 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 9532F8FC0C for ; Tue, 21 Oct 2008 19:01:44 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTP id 355B911CEE; Wed, 22 Oct 2008 05:01:42 +1000 (EST) Received: (from dommail.onthenet.com.au [192.100.104.17]) by dommail.onthenet.com.au (MOS 3.8.6-GA) with HTTP/1.1 id EKN14563 (AUTH peterg@ptree32.com.au); Wed, 22 Oct 2008 05:01:01 +1000 (EST) From: Peter Grehan To: Justin Hibbits X-Mailer: Mirapoint Webmail Direct 3.8.6-GA MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20081022050101.EKN14563@dommail.onthenet.com.au> Date: Wed, 22 Oct 2008 05:01:01 +1000 (EST) X-Mailman-Approved-At: Tue, 21 Oct 2008 19:32:43 +0000 Cc: freebsd-ppc@freebsd.org Subject: Re: graphics on G4 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 19:01:44 -0000 Hi Justin, >> The framebuffer uses a large chunk of kernel VM when mmap'd. >> Are you able to dump some vm stats while doing this e.g. >> sysctl vm.kvm_free ? I shouldn't hit send before the morning coffee :( mmap'ing uses process VM, not kernel, except for the extra alloc's needed for this but these should all come from the non-KVA UMA small malloc area. >There is no vm.kvm_free sysctl on my install. That's probably i386/amd64 only. Worth adding for ppc though. >vm.vmtotal: >System wide totals computed every five seconds: (values in kilobytes) >=============================================== >Processes: (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 74) >Virtual Memory: (Total: 1391388K, Active 288188K) >Real Memory: (Total: 142548K Active 130496K) >Shared Virtual Memory: (Total: 53356K Active: 51276K) >Shared Real Memory: (Total: 23100K Active: 22912K) >Free Memory Pages: 58896K > >vm.loadavg: { 0.15 0.10 0.07 } > >What other stats are relevant? > >I neglected to mention before, but it happens even when I exit out of X, or the >program mmap()ing the video card quits. I have a hunch that it's overwriting >some piece of memory needed by the process list. That sounds like a good place to start. For the case when the program mmap's the video, does it write to all the pages ? One thing to try would be to write a known value to screen memory e.g. 0xdeadcode, and on exit see if that triggers a panic rather than a hang. later, Peter.