| ★ wanayoo — archive 1999 http://www.kernelnotes.org/patch/21-p0321.html | Nouvelle recherche | Portail wanayoo |
|
Ingo Molnar (mingo@pc5829.hil.siemens.at) Fri Mar 28 22:42:00 1997 |
[Home] [Linux 2.0] [Linux 2.1] [Information] [Software] [Distributions] [Links] |
|
On Tue, 18 Mar 1997, David S. Miller wrote: > > For other Posix-ish features like PID->task relations we could use hash > tables ... i'm not sure yet how important this is ... if you've got an > application that uses this heavily, tell me. [or if you know some part of > the kernel that frequently uses it] > > This seems to suggest that we should hash processes when they are > created based upon pid, and perhaps hashed in other tables as well > based upon pgrp etc. > > That would be the real fix to these problems.yup, here is PID hashing implemented for 2.1.30.
trace of kill() from lmbench lat_sig without the patch [166MHz P5]:
-------------------------------------------> Trace: c011bb97 <*SYS_ENTRY*+17/20> (0.72) Trace: c0118693(0.64) Trace: c0118632 (16.45) <---- walks full task list Trace: c01181cf (1.39) Trace: c011bba8 <*SYS_EXIT*+8/10> (0.88) <------------------------------------------ with the patch:
-------------------------------------------> Trace: c011bbc7 <*SYS_ENTRY*+17/20> (0.13) Trace: c01187cf(0.11) Trace: c011877f (0.10) Trace: c01181d9 (0.22) <---- doesnt have to walk Trace: c0118303 (0.49) Trace: c011bbd8 <*SYS_EXIT*+8/10> (1.44) <------------------------------------------ lookup_pid() is used in kill() and fork() currently, but there might be other places too which could use it.
Comments, reports welcome.