[patch-2.4.0-test11-pre2] proc_pid_stat() optimization

From: Tigran Aivazian (tigran@veritas.com)
Date: Sat Nov 11 2000 - 04:42:50 EST


Hi Linus,

No task (even init_task) can ever have task->rlim == NULL because that is
statically allocated whenever task_struct is allocated -- hence the check
in fs/proc/array.c:proc_pid_stat() is redundant.

Tested under 2.4.0-test11-pre2

Regards,
Tigran

--- linux/fs/proc/array.c Mon Oct 30 22:28:06 2000
+++ work/fs/proc/array.c Sat Nov 11 09:35:17 2000
@@ -372,7 +372,7 @@
                 task->start_time,
                 vsize,
                 mm ? mm->rss : 0, /* you might want to shift this left 3 */
- task->rlim ? task->rlim[RLIMIT_RSS].rlim_cur : 0,
+ task->rlim[RLIMIT_RSS].rlim_cur,
                 mm ? mm->start_code : 0,
                 mm ? mm->end_code : 0,
                 mm ? mm->start_stack : 0,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 15 2000 - 21:00:19 EST