Re: How to do a mmap ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik Mouw wrote:
> 
> On Wed, Feb 05, 2003 at 01:20:25AM +0100, Jerome de Vivie wrote:
> > I'm currently writting a module. I use a file from kernelspace. Instead
> > of using "f_op" read/write calls, i would like to mmap this file into
> > the kernel memory and use it as a contiguous space.
> 
> Using files from kernel mode is policy, while the kernel should only
> implement mechanisms. Rethink your design so the file usage is done
> where it belongs: userland. This has the nice advantage that you can
> get the same information from weird locations like a remote SQL
> database by just rewriting the userland backend. There's no way to do
> this from kernel.

The module implement a stackable filesystem (which should work over
NFS). I use a file because i need to store persistant data and i also
need to hide this file from userland. As I need to access some data very
frequently, i prefer using direct memory operation than read/write. All
thoses operations are protected by a mandatory. 

j.

-- 
Jérôme de Vivie
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux