lkml.org 
[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] x86, extable: Handle early exceptions
On Thu, Apr 19, 2012 at 10:02 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>
> ... and I would be *even happier* with an O(1) hash (which pretty much
> *have* to be constructed at compile time.)

Taking relocations into account might be interesting for hashing. I
guess you could hash the relative offsets, though.

But yeah, a hash might be the way to go, and once you generate the
tables at compile-time, why not go all the way? It doesn't need to be
some complex perfect hash, it should be fairly straightforward to just
size the hash right and use some simple linear probing model for
collissions or whatever.

Linus


\
 
 \ /
  Last update: 2012-04-19 19:29    [W:0.069 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site