From owner-freebsd-hackers Fri Aug 30 15:23: 7 2002 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 8DCDF37B405 for ; Fri, 30 Aug 2002 15:22:57 -0700 (PDT) Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B9543E6E for ; Fri, 30 Aug 2002 15:22:57 -0700 (PDT) (envelope-from kmacy@netapp.com) Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.12.3/8.12.3/NTAP-1.4) with ESMTP id g7UMMOl7021534; Fri, 30 Aug 2002 15:22:25 -0700 (PDT) Received: from elwood-fe.eng (elwood-fe.eng.netapp.com [10.56.10.100]) by frejya.corp.netapp.com (8.12.5/8.12.2/NTAP-1.4) with ESMTP id g7UMMOAs026875; Fri, 30 Aug 2002 15:22:24 -0700 (PDT) Received: from localhost (kmacy@localhost) by elwood-fe.eng (8.11.6+Sun/8.11.6) with ESMTP id g7UMMO201156; Fri, 30 Aug 2002 15:22:24 -0700 (PDT) Date: Fri, 30 Aug 2002 15:22:24 -0700 (PDT) From: Kip Macy To: Julian Elischer Cc: "'freebsd-hackers@freebsd.org'" Subject: RE: Copying from Virtual Address Space to Physical Address In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG While we're on the topic of vmapbuf: I have a kernel module that maps two 64k chunks of user memory into the kernel using the same set of steps that cam_periph_mapmem uses. However, I inevitably get the following panic after running the code for a bit: Aug 30 14:55:26 testhost /kernel: panic: worklist_remove: not on list Aug 30 14:55:26 testhost /kernel: Aug 30 14:55:26 testhost /kernel: syncing disks... 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Aug 30 14:55:26 testhost /kernel: giving up on 1 buffers This is a panic in ffs_softdep.c, it implies to me that either the FFS code isn't recognizing that not all buffers belong to it or getpbuf isn't doing all the needed accounting. I notice that I am calling getpbuf(NULL), just as cam_periph_mapmem does. But above its definition in the comment is: * NOTE: pfreecnt can be NULL, but this 'feature' will be removed * relatively soon when the rest of the subsystems get smart about it. XXX Also worthy of note is that my kernel module has a lot of printfs which obviously translate to a lot of synchronous writes by syslog, presumably putting memory pressure on the file system. When guessing whether Kirk is at fault or I am fault, it is usually a safe bet that I am at fault ;-). Any insights? -Kip On Fri, 30 Aug 2002, Julian Elischer wrote: > > > On Fri, 30 Aug 2002, Balaji, Pavan wrote: > > > > > Thanx. It's nearly done. I just need to know two more small things. > > > > physio() requires a dev_t as a parameter. What do I give in over here? I > > can't give NULL, cause it does use it for some stuff in the function > > definition. > > I wasn't suggesting that you use physio() but that you use it and it's > friend as a prototype for yourself when you write a function to do what > you want. The dev_t is associated with the device this is doing > IO from so it's not necessarily relelvant to you. > > you haven't told us enough about what you want to do to allow us to > really understand your problem. > > > > > > > > > > Also, the only other parameters to physio() are the uio and the ioflag > > (which is not used at all). So, where is the kernel virtual address mapping? > > Do I have to do something this this dev_t thing to open a virtual device > > which maps to the kernel virtual address. If yes, how do I do this? > > > > Thanx. > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message