lkml.org 
[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Date
From
SubjectRe: seperator error in __mask_snprintf_len
> >  static inline void bitmap_complement(unsigned long *bitmap, int bits)
> > {
> > int k;
> > + int max = BITS_TO_LONGS(bits);
> >
> > - for (k = 0; k < BITS_TO_LONGS(bits); ++k)
> > + for (k = 0; k < max; ++k)
> > bitmap[k] = ~bitmap[k];
>
> OK. bitmap_and() and bitmap_or() were converted to this form a while back
> because they too were hitting the bug. On ia32. It might no longer
> happen now they're uninlined but whatever - you don't have to look
> at the code and think "gee, I hope the compiler moves that arith out
> of the loop".

BTW I think the original point of the inlining was that when you have bits ==
BITS_PER_LONG the function could collapse to a single ~ operation using
the compiler's optimizer. That would be the case with nodemasks on x86-64.
As for the NUMA API i don't care particularly because there is no bitmap
manipulation in any fast path. Avoiding miscompilations is definitely
higher priority.

-Andi
-
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 14:00    [W:0.086 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site