Jeff Garzik wrote: > > PS: Because of usage of prefetch in include/linux/list.h, the > > memory prefetch is triggered 137 times on my configuration... > We need to merge in __builtin_prefetch support into the kernel, > because gcc 3.1 recently got support for it. It would be nice at > least for future prefetch-related patches to perhaps call > __builtin_prefetch, and have the headers substitute a prefetch if > the compiler does not support it. OK, I added this suggestion -- it changes compiler.h to look out for gcc-3.1 and then set macros for __builtin_prefetch. But in order to get gcc 3.1 to issue prefetches, the -mcpu (and/or -march?) must be set to pentium3 or pentium4 (same applies for AMD athlons). There's one minor nit to this: "copy_to_user" has declared the parameter "from" as const and then does a prefetch on "from".... This produces a warning: /usr/src/linux-2.4.17-mine/include/asm/uaccess.h: In function `__constant_copy_to_user': /usr/src/linux-2.4.17-mine/include/asm/uaccess.h:549: warning: passing arg 1 of `__builtin_prefetch' discards qualifiers from pointer target type How can I resolve this ? Greetings, raY -- --------------------------------------------------------------- Rainer Keller Mail: Keller@hlrs.de Allmandring 30 WWW: http://www.hlrs.de/people/keller 70550 Stuttgart Tel. 0711 / 685 5858