shared memory via /dev/shm?

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri Jul 31 21:47:58 EDT 2015


On Fri, 31 Jul 2015 16:16:14 -0700, Nicholas Murphy said:
> Hmm…I suppose not.  I’d would still be curious what the right way to do this
> is, though?  I think I can get away with that trick, but I can also imagine
> scenarios where I’d want the kernel module itself to create the file.

In general, the right answer is to do the file handling in userspace. Among
other things, that makes it possible to avoid hard-coding a filename in
kernel code (remember - we try to make the kernel be about mechanism, not
policy).

Among other things, it avoids the effort of opening a file that userspace
never actually does anything with - if you wait for userspace to open it
and notify the kernel, you can be pretty sure that it's about to be used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150731/29503d01/attachment.bin 


More information about the Kernelnewbies mailing list