lkml.org 
[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.0-test3-mm1: scheduling while atomic (ext3?)
Jurriaan on adsl-gate <thunder7@xs4all.nl> wrote:
>
> > Exactly what sort of CPU are you using?
> > -
> AMD Athlon XP2400+ on a VIA KT400 chipset, single CPU-system.

OK, thanks. The word is that Athlons will, very occasionally,
take a fault when prefetching from an unmapped address.

include/linux/list.h | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)

diff -puN include/linux/list.h~hlist_for_each-fix include/linux/list.h
--- 25/include/linux/list.h~hlist_for_each-fix 2003-08-13 02:29:32.000000000 -0700
+++ 25-akpm/include/linux/list.h 2003-08-13 02:37:33.000000000 -0700
@@ -504,11 +504,15 @@ static __inline__ void hlist_add_after(s

#define hlist_entry(ptr, type, member) container_of(ptr,type,member)

-/* Cannot easily do prefetch unfortunately */
-#define hlist_for_each(pos, head) \
- for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
- pos = pos->next)
+#define hlist_for_each(pos, head) \
+ for ( pos = (head)->first; \
+ likely(pos) && ({ \
+ if (likely(pos->next)) \
+ prefetch(pos->next); \
+ 1; }); \
+ pos = pos->next)

+/* Cannot easily do prefetch unfortunately */
#define hlist_for_each_safe(pos, n, head) \
for (pos = (head)->first; n = pos ? pos->next : 0, pos; \
pos = n)
_

-
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: 2005-03-22 13:47    [W:0.047 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site