Re: [RFC PATCH 1/2] Shrink compat_ioctl.c

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: Pavel Machek <pavel@...>, Ingo Molnar <mingo@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, September 29, 2008 - 7:38 pm

On Tue, 2008-09-30 at 01:38 +0200, Andi Kleen wrote:

The original hash table was 256 pointers into the main table. I simply
rearrange the main table so the first 256 entries have an appropriate
hash. Basically:

for i in len(table):
  h = hash(table[i])
  swap(table[i], table[hash])

At the end of this loop, table[0:256] will contain an appropriate table
entry, if it exists. So no secondary table is needed.

-- 
Mathematics is the supreme nostalgia of our time.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 1/2] Shrink compat_ioctl.c, Matt Mackall, (Mon Sep 29, 7:27 pm)
Re: [RFC PATCH 1/2] Shrink compat_ioctl.c, Andi Kleen, (Mon Sep 29, 7:38 pm)
Re: [RFC PATCH 1/2] Shrink compat_ioctl.c, Matt Mackall, (Mon Sep 29, 7:38 pm)
[RFC PATCH 2/2] Shrink compat_ioctl.c, Matt Mackall, (Mon Sep 29, 7:29 pm)