Article View: fa.netbsd.tech.kern
Article #48Re: posix shared memory
From: Mindaugas Rasiukevicius
Date: Fri, 29 Mar 2013 15:49
Date: Fri, 29 Mar 2013 15:49
34 lines
2471 bytes
2471 bytes
Hi, yamt@mwd.biglobe.ne.jp (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 > (thus cc:) > > which way should we go? > > IMO userland implementation is better because: > - simpler > - smaller > - a bug would have less impact > - "locking object in memory" functionality is better to be > implemented with more generic api like fcntl if necessary We should go with the userland implementation. After some though I basically agree with you that facilities like memory locking can be implemented with fcntl, mount option tmpfs or whatever. 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 > > YAMAMOTO Takashi -- Mindaugas
Technical Details
Message-ID:
<fa.qqCXfd43VKbb+asSzBmBfN42iCQ@ifi.uio.no>Path:
arc1-ca.pugleaf.net!ex12ni10629wid.1!nntp.google.com!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mailReferences:
<fa.NBppblL+1aBqokYkfcBQZSUIQ6k@ifi.uio.no>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c6f4,c8504c1ed5e12aa5
X-Google-NewGroupId: yes
X-Google-Attributes: gidb7e13b6095,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.180.92.202 with SMTP id co10mr951318wib.1.1364572189745;
Fri, 29 Mar 2013 08:49:49 -0700 (PDT)
Path: arc1-ca.pugleaf.net!ex12ni10629wid.1!nntp.google.com!goblin1!goblin.stu.neva.ru!uio.no!nntp.uio.no!.POSTED!not-for-mail
From: Mindaugas Rasiukevicius <rmind@netbsd.org>
Newsgroups: fa.netbsd.tech.kern
Subject: Re: posix shared memory
Date: Fri, 29 Mar 2013 15:49:49 UTC
Organization: Internet mailing list
Lines: 34
Sender: tech-kern-owner@NetBSD.org
Message-ID: <fa.qqCXfd43VKbb+asSzBmBfN42iCQ@ifi.uio.no>
References: <fa.NBppblL+1aBqokYkfcBQZSUIQ6k@ifi.uio.no>
NNTP-Posting-Host: mail-jess.uio.no
Mime-Version: 1.0
X-Trace: readme.uio.no 1364572189 11474 129.240.7.9 (29 Mar 2013 15:49:49 GMT)
X-Complaints-To: abuse@uio.no
NNTP-Posting-Date: Fri, 29 Mar 2013 15:49:49 +0000 (UTC)
Cc: tech-userlevel@netbsd.org, tech-kern@netbsd.org
To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Delivered-To: tech-kern@netbsd.org
In-Reply-To: <20130329142706.30B3A14A293@mail.netbsd.org>
X-Mailer: Sylpheed
List-Id: tech-kern.NetBSD.org
Original-Date: Fri, 29 Mar 2013 15:48:49 +0000
Original-Message-Id: <20130329154933.7DCA214A206@mail.netbsd.org>
Original-References: <20130329142706.30B3A14A293@mail.netbsd.org>
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit