Re: ps performance sucks (was Re: dcache_rcu [performance results])

From: Werner Almesberger (wa@almesberger.net)
Date: Tue Nov 05 2002 - 01:14:49 EST


Erik Andersen wrote:
> Hehe. You just reinvented my old /dev/ps driver. :)

Hmm, you still need 2+#pids operations, while my approach could
essentially do everything in a single read. Besides, many people
don't exactly love ioctls.

Furthermore, you'd need to version your big struct pid_info,
while my approach wouldn't have problems if fields are added or
removed (only if their content changes).

Two advantages of your approach are that the amount of data
cached in the kernel is limited to max(sizeof(pid_t)*#pids,
sizeof(struct pid_info)), and that you do less work under
tasklist_lock.

> I do dislike /dev/ps mightily. If the problem is that /proc
> is too large, then the right solution is to just clean up
> /proc. Which is getting done. And yes, /proc will be larger
> than /dev/ps, but I still find that preferable to having two
> incompatible ways to do the same thing.

Hmm yes, so he might not like my /proc/grab-taskdata-FAST
either :)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:36 EST