Hello Julian,
- if entries are more than gc_thresh2 => run GC on each 5sec
What does it do exactly? Could you point me to the code?
2.4, net/core/neighbour.c:neigh_alloc()
Aha:
unsigned long now = jiffies;
if (tbl->entries > tbl->gc_thresh3 ||
(tbl->entries > tbl->gc_thresh2 &&
now - tbl->last_flush > 5*HZ)) {
if (neigh_forced_gc(tbl) == 0 &&
tbl->entries > tbl->gc_thresh3)
return NULL;
}
Ok, this means we bail out, if:
o the amount of routing entries becomes bigger than gc_thesh3
o the amount of routing entries is bigger than gc_thresh2 and
the last routing table flush was 5 seconds ago
o if garbage collection of unused table entries fails and the
amount of routing entries is still higher than gc_thresh3
Why do you need to check against gc_thresh3 if neigh_forced_gc(tbl) failed?
We collect the garbage, if:
o nobody refers to it
o it is not p(r)ermanent
o NEW and probably wrong (how do you detect this and how can you
flood the neighbour table?)
This does make sense. Why are those values so low as a standard? Most
boxes nowadays have GBytes of memory :)
Yes, the thresholds for the neighbour table are
not tuned according to the RAM. Of course, tuning the hash
size (NEIGH_HASHMASK) and/or the hash formula could be a good
idea.
This would really be very simple? Could you do it? Or is there something
that Alexey thought of when choosing such low gc_thresh3 numbers?
The max_size for routing cache is not reached
I don't think you could ever do that anyway.
Cheers,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc
|