Hi, the kernel contains an optimization that skips the linked list walk in get_tgid_list for the common case of sequential accesses. Unfortunately the optimization is buggy (missing NULL pointer check for the result of find_task_by_pid) and broken (actually - broken twice: the tgid value that is stored in f_version is always 0 because tgid is overwritten when the string is created and additionally the common case is not filldir < 0, it's running out of nr_tgids). The attached patch fixes these bugs. Roger: could you run your 100k processes test against a kernel with this fix applied? I'm just interested how much it helps. One obvious result are fewer getdents64 syscalls: instead of returning 20 entries (480 bytes) the new code fills the user space buffer completely (42 entries/syscall). Andrew, could you add the patch to your -mm tree? Signed-Off-By: Manfred Spraul