Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 10 May 2003 13:44:55 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygipc (and PostgreSQL) XP problem resolved! Message-ID: <20030510174455.GB12325@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20030508135217 DOT GD512 AT tishler DOT net> <3EBB22F5 DOT 4000801 AT ece DOT gatech DOT edu> <1052541657 DOT 1675 DOT 5 DOT camel AT localhost> <3EBC8ED0 DOT 4040906 AT ece DOT gatech DOT edu> <20030510072239 DOT GA19367 AT cygbert DOT vinschen DOT de> <1052554219 DOT 1824 DOT 14 DOT camel AT localhost> <20030510082949 DOT GD19367 AT cygbert DOT vinschen DOT de> <3EBD3179 DOT 6070004 AT ece DOT gatech DOT edu> <20030510171629 DOT GB11448 AT redhat DOT com> <3EBD3896 DOT 8000202 AT ece DOT gatech DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EBD3896.8000202@ece.gatech.edu> User-Agent: Mutt/1.4.1i On Sat, May 10, 2003 at 01:36:22PM -0400, Charles Wilson wrote: >Christopher Faylor wrote: > >>>key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) >>> | ((id & 0xff) << 24)); >>> >>>Given the sizes of the various fields of st, there are obvious problems >>>with aliasing here. >> >> >>But, be advised that I'm in the process of changing the inode field to >>a long long so I'm not sure that we wouldn't be just pushing this off >>a little further. > >Urk. That's right -- but unless there is another primitive type that is >bigger than 64 bits, then we're out of luck, and will have to accept >aliasing of some sort. > >st_dev = 16 bits >st_ino = 64 bits (tentative) >id = 8 bits > >To pack that into 64 bits, we need to hash st_ino down from 64 to 40 >bits. Given your future implementation of st_inode, what distribution >of values do you expect in the 64bits? This will help to design the >proper hash to minimize conflicts... Where applicable, cygwin is going to use Microsoft's notion of an "inode" without resorting to the crude "hashing" that Cygwin now does. win32 uses two 32 bit quantities to account for the "file index" on disk. I assume that, in most cases, the high order byte is probably zero but I don't know for sure. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/