lkml.org 
[lkml]   [2003]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Oops] i386 mm/slab.c (cache_flusharray)
Linus Torvalds wrote:

>On Tue, 25 Nov 2003 pinotj@club-internet.fr wrote:
>
>
>>3. 2.6.0-test10 vanilla + PREEMPT_CONFIG=y + patch printk + patch magic numbers
>>The patch solves the problem, I can compile 4 times a kernel and do heavy work in parallele (load average around 1.2 during 2 hours) without any problems.
>>
>>
>
>Those magic numbers don't make any sense. In particular, SLAB_LIMIT is
>clearly bogus both in the original version and in the "magic number
>patch". The only place that uses SLAB_LIMIT is the code that decides how
>many entries fit in one slab, and quite frankly, it makes no _sense_ to
>have a SLAB_LIMIT that is big enough to be unsigned.
>
Object numbers (kmem_bufctl_t) are unsigned, but some values have a
special meaning:
"-1" is the magic value for end-of-list.
"-2" is the magic value for object in use.
All other values are valid object numbers. Right now object numbers are
unsigned int, but initially I considered unsigned char or unsigned
short. And then an explicit SLAB_LIMIT is necessary - with unsigned
char, the limit would be 253 objects per slab, which could be reached if
someone creates objects smaller than 16 bytes.

In Jerome's case, the debug checks noticed that the object-in-use
sentinel was not in the bufctl entry during free, instead there was a
"-1". There are several sources for the "-1": My initial guess was
either a bug in slab, or a bad memory cell (only one bit difference).
Thus I sent him a patch that changes multiple bits. Result: It remained
a single bit change, i.e it's proven that slab doesn't write BUFCTL_END
into the wrong slot.

--
Manfred

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