[lkml]   [2003]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] procfs/procps threading performance speedup, 2.5.62
Ingo Molnar writes:


> to fix this overhead i've introduced a 'lookup cursor' cookie, which is
> cached in filp->private_data, across readdir() [getdents64()] calls. If
> the cursor matches then we skip all the overhead of skipping threads. If
> the cursor is not available then we fall back to the old-style skipping
> algorithm.

Shouldn't filp->private_data be cleared on lseek? It looks like lookup
cursor is never cleared once set and so readdir will always go forward
independently of ->f_pos updates. Note that glibc implementation of
readdir() (on the top of getdents64()) does call lseek on the
directory. So does seekdir(3).

> 2) procps is forced to parse every thread in /proc to build up accurate
> 'process CPU usage' counters. The parsing and accessing of every

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.071 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site