<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dave Anderson wrote:
<blockquote TYPE=CITE>Hi Sharyathi,
<p>I'm getting a lot of these on a live x86_64 system:
<p> if (avail > vt->kmem_max_limit)
{
<br>
error(INFO,
<br> "\"%s\" cache:
shared array_cache.avail %d greater than limit %ld\n",
<br>
si->curname, avail, vt->kmem_max_limit);
<br>
si->errors++;
<br>
FREEBUF(start_address);
<br>
return;
<br> }
<p>I believe that the kmem_max_limit should be be multiplied by the number
<br>of nodes in this function, but since I have only one node, it appears
that the
<br>the "max" calculation is significantly different at init-time vs. when
the kmem
<br>command is run later? At a minimum, I would argue for noting
somewhere
<br>that vt->kmem_max_limit should be bumped up the next time the kmem
<br>command is run. Or perhaps it should be recalculated prior to
each kmem
<br>command run?
<p>Did you ever see this occurrance on a live ppc64 machine?
<p>Dave</blockquote>
<tt>OK -- I found the bug here in your patch to max_cpudata_limit():</tt><tt></tt>
<p><tt>+ if(readmem(start_address[i]
+ OFFSET(kmem_list3_shared), KVADDR, &shared, sizeof(void *),</tt>
<br><tt>+
"kmem_list3 shared", RETURN_ON_ERROR|QUIET) ||</tt>
<br><tt>+
readmem(shared + OFFSET(array_cache_limit),</tt>
<br><tt>+
KVADDR, &limit, sizeof(int), "shared array_cache avail",</tt>
<br><tt>+
RETURN_ON_ERROR|QUIET))</tt>
<br><tt>+
if (limit > max_limit)</tt>
<br><tt>+
max_limit = limit;</tt><tt></tt>
<p><tt>The "limit" value was not even being read because the patch is using</tt>
<br><tt>an "||" instead of an "&&" between the two readmem()'s.
So it never</tt>
<br><tt>does the second readmem(), and ends up using a leftover value of
"limit".</tt><tt></tt>
<p><tt>Don't bother filing another patch -- I'll keep working with this
one.</tt><tt></tt>
<p><tt>Thanks,</tt>
<br><tt> Dave</tt>
<br><tt></tt>
<br><tt></tt> </html>