Messages in this thread | | | From | Keith Owens <> | Subject | Re: kiobuf using kernel pages | Date | Fri, 12 Nov 1999 16:30:23 +1100 |
| |
On Fri, 12 Nov 1999 02:03:39 +0000 (GMT), "Stephen C. Tweedie" <sct@redhat.com> wrote: >On Thu, 11 Nov 1999 08:55:54 -0800 (PST), Matt Robinson ><yakker@cthulhu.engr.sgi.com> said: >> We agree it's a violation in the worst sense. :) The problem is there >> was no good way to set AS_KERNEL without calling map_user_kiobuf() on >> your own. Until such a scheme is put in place (which we believe will be >> at some point soon), we put something in to make it work for us. It's >> certainly better than a conditional check in map_user_kiobuf(). :) > >Umm, why do you need this at all? The caller is either file IO --- in >which case you just do the map_user_kiobuf and pass that to the kiovec >IO routine --- or it is kernel-originated IO, in which case you create a >kiobuf of your own and just stuff it full of references to the kernel >pages you want to read or write.
User I/O: sys_write->sd_raw_fops.write->sd_raw_write->sd_raw_rw Kernel I/O: vmdump->sd_raw_fops.write->sd_raw_write->sd_raw_rw
In SGI's 2.2.13 patch, sd_raw_write allocates the kiobuf, sd_raw_rw maps and unmaps it so sd_raw_rw has to know what type of pages are being used. In my 2.3.26 version, sd_raw_write allocates, maps and unmaps the kiobuf, sd_raw_rw just uses whatever pages are in the kiobuf. My version sets up user or kernel mappings depending on the filp, or it would if I knew how to complete map_kernel_kiobuf(). SCT is redoing kiobuf mappings so I am waiting on that change.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |