Date: Fri, 30 Aug 2002 15:22:24 -0700 (PDT) From: Kip Macy <kmacy@netapp.com> To: Julian Elischer <julian@elischer.org> Cc: "'freebsd-hackers@freebsd.org'" <freebsd-hackers@FreeBSD.ORG> Subject: RE: Copying from Virtual Address Space to Physical Address Message-ID: <Pine.GSO.4.10.10208301503170.537-100000@elwood> In-Reply-To: <Pine.BSF.4.21.0208301438000.4649-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10208301503170.537-100000>