lkml.org 
[lkml]   [2000]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch-2.4.0-test11-pre2] proc_pid_stat() optimization
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/

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