From owner-freebsd-arch Mon Oct 7 17:34:34 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E49337B401; Mon, 7 Oct 2002 17:34:32 -0700 (PDT) Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9A1C43E6E; Mon, 7 Oct 2002 17:34:31 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0113.cvx22-bradley.dialup.earthlink.net ([209.179.198.113] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17yiKN-00065C-00; Mon, 07 Oct 2002 17:34:24 -0700 Message-ID: <3DA2278A.A1A33A02@mindspring.com> Date: Mon, 07 Oct 2002 17:32:10 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: Sam Leffler , freebsd-arch@freebsd.org, freebsd-net@freebsd.org Subject: Re: CFR: m_tag patch References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer wrote: > > This is insufficient for Alpha and other 64 bit architectures. I > > think what you are asking for is really a 'void *'. > > IT IS NOT A POINTER! > > it is a 32 bit unsigned number. OK, I give up. Why is 2^32 possibilities better than 2^16th possibilities? You have > 65536 different chunks of metadata you need to deal with? > > The other issue here is that your idea of an opaque API/ABI indicator > > is in conflict, unless you say that this is a pointer, and then format > > the initial information pointed to by the pointer. Otherwise, you > > will need a small indirection structure that's pointed to the pointer, > > AND which contains the API/ABI identifier (i.e. you will need two, not > > one piece of information for that -- which is what you show, but not > > what you describe in your text). > > it is not used to look up anything.. > it is used to verify only. > > it is just working on the principal that there is not going to be > a collision in the 32 bit space. Especially when we create them from > "time since the epoch", and when teh various authors can see each > other's choices of value. I don't buy this. At this point, you are arguing statistical protection, and you are talking about a difference in collision probability, not collision avoidance. If 16 is bad, and 32 is good, then 64 is better. If 64 is "way too big", then 16 vs. 32 is just a matter of opinion, nothing else. > > This is moderately bogus. > > no it is not. > > I estimate that the chance of having a collision given all the > factors is 1:2^50 or so ASSUMING THAT 1000000 PEOPLE DEVELOP THEIR OWN > MODULES AND DO NOT CHECK THEM IN BUT DO ALL SHARE THEM WITH EACH OTHER. That assumes that the numbers people pick are actually random; they won't be. The way to handle this is to ask the kernel for a unique number for use in the registration process. > > Specifically, if you are going to register in new types without an > > assigned numbers authority (e.g. if I have a vendor private extension, > > which I wish to implement, yet not have collide with someone else's > > vendor private extension or a future FreeBSD "standard extension"), > > then you need to implement a registration interface for named > > registration, and use *that*. > > Terry if you like your chances of developing a module within the next > 100 years in exactly the same moment to the second that someone else > does so, and neither of you checks in that module, and your modules > have to co-exist, and you don't TALK to each other, then I have some > used lottery tickets I an sell you.. So it's a timestamp? You didn't say that it was a 32 bit time counter, so that simultaneuity was a requirement for a collision. > > I think it has to. The reason he has this is pretty clear from > > his crypto work, and the reason for the linked list is to, in the > > limit, allow a linear traversal of the list elements to find data > > that's relevent to you. > > Read what he said Terry.. for gods sake. He said that there are usually > < 2 metadata elements each being a few bytes long.. You keep avoiding his reason for the linked list, Julian. > > It's kind of ugly, but "anything that works is better than anything > > that doesn't"... it at least guarantees that it *can* work. > > there is more than one way to skin a cat. the fact that it is a linked > list doesn't mean it has to be a linked list. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message