memory swapping question

Jihua Cheng JihuaC at
Sat Sep 25 08:51:48 EST 2004


I am new to linux kernel. Sorry for the following dumbing question:

I am writing a linux driver which provides write() for user application, under 2.4.20. The data from application will be written to hardware io ports, byte by byte. In my write() function, I use __copy_from_user() to copy data from user-mode to kernel-mode memory, then to read the kernel-mode memory and to output data to hardware io ports byte by byte. The write() does not return until all the data are outputed to hardware. However, I think the data copy from user-to kernel-mode wastes my time. In my Write() function, Could I read one byte(word) by one byte(word) from user-mode memory? and How?Do I have the memory swaping problem, under what situation?

Thanks so much for your kindly help.



More information about the Linuxppc-dev mailing list