lkml.org 
[lkml]   [2006]   [Dec]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 14 Dec 2006 16:08:04 -0800
FromMatt Helsley <>
SubjectPrefetch hint
Prefetch the entire array of function pointers.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>

---
 kernel/task_watchers.c |    2 ++
 1 file changed, 2 insertions(+)
Index: linux-2.6.19/kernel/task_watchers.c
===================================================================
--- linux-2.6.19.orig/kernel/task_watchers.c
+++ linux-2.6.19/kernel/task_watchers.c
@@ -1,6 +1,7 @@
 #include <linux/init.h>
+#include <linux/prefetch.h>
 
 /* Defined in include/asm-generic/vmlinux.lds.h */
 extern const task_watcher_fn __start_task_init[],
 		__start_task_clone[], __start_task_exec[],
 		__start_task_uid[], __start_task_gid[],
@@ -30,10 +31,11 @@ int notify_task_watchers(unsigned int ev
 
 	tw_call = twtable[ev];
 	tw_end = twtable[ev + 1];
 
 	/* Call all of the watchers, report the first error */
+	prefetch_range(tw_call, tw_end - tw_call);
 	for (; tw_call < tw_end; tw_call++) {
 		err = (*tw_call)(val, tsk);
 		if (unlikely((err < 0) && (ret_err == 0)))
 			ret_err = err;
 	}
--
-
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/

\
 
 \ /
  Last update: 2006-12-15 01:29    [from the cache]
©2003-2008