Skip to contentSkip to conversation

idea to enhance get_pid()

DISCUSSION lenny lv 2 participants 2 messages Apr 20, 2002

lore
Share & tools
lore

lenny lv

author
#0 lore raw

Hi there,

I've got an idea to speed up linux/kernel/fork.c/get_pid(). Why not use bitmap to alloc/free the pids? Is it because 4KB(32K/8) memory scanning is slower than the current get_pid() version? Does anyone benchmark them?

Thanks,
Lenny

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

#1 lore raw
Quoted 3 lines · lenny lv

I've got an idea to speed up linux/kernel/fork.c/get_pid(). Why not use bitmap to alloc/free the pids? Is it because 4KB(32K/8) memory scanning is slower than the current get_pid() version? Does anyone benchmark them?

This could have been a good idea if Linux was to stay with 15-bit pids forever. The code you are suggesting will have to be rewritten sometime to support 32 bit pids.

The last time I checked, the only thing that stops the move back to 32-bit pids is a bug in the bash shell, and just a few workable IPC interfaces and libc breakages.

Are 32 bit pids planned for 2.5?