tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: subr_kmem
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Mindaugas,
On 07/23/2012 12:55 AM, Mindaugas Rasiukevicius wrote:
> Hello Lars,
>
> Lars Heidieker <lars%heidieker.de@localhost> wrote:
>> slight improvement on kmem(9):
>>
>> splitting the lookup table into two parts - this reduces the size
>> of the lookup table -> touching less cache-lines (e.g. on 64bit
>> down from 4096b to 1024b + 64b)
>
> Why do you think the split would result in touching fewer
> cache-lines? Because of prefetch? I do not really think it has a
> real effect.
>
The lookup array gets very quickly less dense populated with
increasing allocation size, so if differently sized allocations are
done in a sequence hitting different parts of the lookup table it's
beneficial to have it more dense, that's where the advantage is.
>> - expanding cache size up to PAGE_SIZE for larger then 4k
>> PAGE_SIZE machines (without blowing up the size of the lookup
>> table further)
>
> I guess this is a part which gives you a tiny speedup. However,
> these sizes are quite large and we do not know the fill ratio - it
> may waste quite a bit of memory, in favour of tiny speedup.
>
For PAGE_SIZE 4k nothing changed caches up to PAGE_SIZE are created,
for 8k one additional cache with 8k and for 16k two additional caches
(8k and 16k) are created.
These larger caches are not used frequently but going up to PAGE_SIZE
in either case doesn't introduce any increased wastage.
For 16k having an 8k cache will most likely reduce memory consumption.
> Do you have more data? Otherwise, I am not really sure if these
> changes are a good idea..
>
Well I can do some more runs...
Lars
- --
- ------------------------------------
Mystische Erklärungen:
Die mystischen Erklärungen gelten für tief;
die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind.
-- Friedrich Nietzsche
[ Die Fröhliche Wissenschaft Buch 3, 126 ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlAM60MACgkQcxuYqjT7GRavCQCgyTQ2hZEq6OhiXmQIBdwXC2XY
0OwAn1rL8qhMs1BDe34RrotwmKr5E+2+
=8+uo
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index