Re: [PATCH, v3] shmat: introduce flag SHM_MAP_NOT_FIXED

From: Alan Cox
Date: Wed Oct 08 2008 - 04:34:44 EST


> Perhaps I'm confused but my /dev/shm doesn't have any such files,
> but I see a variety of shm segments in ipcs.
>
> What would the path passed to shm_open look like?

Well right now they don't get exposed as they are created unlinked but
that is a trivial tweak to mm/shmem.c.

> > and nobody is wanting to map those at fixed addresses.
>
> You're saying it should always use the address as a search hint?

Nothing of the sort. I'm pointing out that mmap and shm_open already
provide all the needed interfaces for this for real world applications
today.
>
> Just changing the semantics unconditionally would seem risky to me. After
> all as you point out they are primarily for compatibility and for that keeping
> old semantics would seem better to me.

We don't need to change any semantics, there is a perfectly good
alternative standards based interface. At most you might want to make the
sys3 shared memory segments appear in /dev/shm/ somewhere.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/