linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Rohland <cr@sap.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: lothar.maerkle@gmx.de, linux-mm@kvack.org
Subject: Re: shmfs/tmpfs/vm-fs
Date: 08 Dec 2001 10:54:05 +0100	[thread overview]
Message-ID: <m38zcejc65.fsf@linux.local> (raw)
In-Reply-To: <3C11B5A4.1070708@zytor.com>

Hi hpa,

On Fri, 07 Dec 2001, H. Peter Anvin wrote:
> Christoph Rohland wrote:
> 
>> It was possible in some 2.3 kernels, but this had to be removed
>> with the cleanup :-(
> 
> I guess I really still don't understand why.  

It is mainly a matter of simplicity: Filesystem semantics differ
considerably from the SYSV semantics and I can assure you that the old
implementation was a nightmare to maintain and keep compatible with
all the little oddities of SYSV shm.

E.g. there is a creator id which you cannot change and
which is always allowed to control the opject. Also the Linux feature,
that you can SHM_RMID a segment but still access is with its id as
long as there are references is pretty unusual for filesystems.

So I had to realise that the SYSV shm API does _not_ correspond to
files in a directory, but it more an open struct file without a linked
directory entry. This struct file is managed by the SYSV ipc module
and the user can access it via shmat. This model works out quite
naturally.

The whole interface between ipc/shm.c and mm/shmem.c is
shmem_file_setup, shmem_nopage and shmem_lock!  shmem does not know
anything about SYSV and its weird semantics.

> I certainly can understand that it would be highly undesirable if it
> had to be supported before /dev/shm is mounted, but I don't see any
> reason to allow SysV shared memory before mounting /dev/shm.

I would like this behaviour as well, but it would mean to complicate
the whole thing more than it's worth.

Greetings
		Christoph


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

      reply	other threads:[~2001-12-08  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06 15:54 shmfs/tmpfs/vm-fs der erste Schuettler
2001-12-07 10:51 ` shmfs/tmpfs/vm-fs Christoph Rohland
2001-12-07 11:37   ` shmfs/tmpfs/vm-fs der erste Schuettler
2001-12-07 15:07     ` shmfs/tmpfs/vm-fs Christoph Rohland
2001-12-08  6:39       ` shmfs/tmpfs/vm-fs H. Peter Anvin
2001-12-08  9:54         ` Christoph Rohland [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m38zcejc65.fsf@linux.local \
    --to=cr@sap.com \
    --cc=hpa@zytor.com \
    --cc=linux-mm@kvack.org \
    --cc=lothar.maerkle@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox