Re: [PATCH v3 03/16] index-helper: new daemon for caching index and related stuff

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

 



On Fri, 2016-04-08 at 18:16 -0400, David Turner wrote:
> And SHM on Macs works a bit differently than on Linux in at least two
> irritating ways. 
> 
> So, uh, new version to come once I actually make it work on Mac.
> Probably Monday.

I was chatting with a friend about this and he mentioned that SHM does
not really fit well into the Unix "everything is a file" model.  It
lives in a separate namespace, and still requires most of the file-like
operations just with funny names and a separate namespace: shm_open,
shm_unlink.  This weirdness is something I noticed in my porting work:
on OS X, a shm name can only be 32 bytes long, requiring weird hacks.
And on OSX, fstat on a shm fd is rounded up to the page size (!). 
 There may also be other portability issues that I have not yet
discovered.

Instead, my friend suggests that we should just use files.  For
instance, we could do $TMPDIR/$index_helper_pid/shm-index.$sha.  

(I'm proposing $TMPDIR because it's cleaned up on reboot so we don't
need any manual intervention or complicated gc schemes)

What do folks think of this?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]