tech-kern archive

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

Re: posix shared memory



hi,

> On Tue, Apr 02, 2013 at 02:27:15AM +0000, YAMAMOTO Takashi wrote:
>> > yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
>> >> i have userland implementation of posix shared memory.
>> >> (attached)
>> >> 
>> >> rmind proposed a kernel implementation while ago.
>> >> http://mail-index.netbsd.org/tech-kern/2009/07/30/msg005599.html
>> > 
>> > However, I would say it would be better to create tmpfs partition
>> > for this.  A while ago I came up with practically same code, but
>> > also checking for the fs type:
>> > 
>> > http://www.netbsd.org/~rmind/shm.c
>> 
>> i don't think it's a good idea to force fstype.
>> if we want to recommend tmpfs, it's a job for sysinst, not libc.
> 
> Wouldn't the choice of filesystem have a significant impact on the
> behaviour?  (speed, persistence, need for an actual disk, etc...)

yes.

wrt persistence, i guess something similar to /etc/rc.d/cleartmp is
good enough, though.

> Perhaps forcing it might not be a good idea, but it seems like 
> requiring something to be configured, and not having a good default
> that is known to work, will cause an unnecessary waste of time
> for anyone that might try to use this.

yes.

as far as i know there are few users of this api in the field.
so it's difficult for me to guess expectations.
eg. how large the filesystem should be?
rhel seems to use "half of ram".  it's their tmpfs's default.
solaris doesn't seem to use a dedicated filesystem.  it just uses /tmp.
(with some name mangling)

YAMAMOTO Takashi

> 
> eric


Home | Main Index | Thread Index | Old Index