-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-03-06 09:05, David Laight wrote: > On Tue, Mar 05, 2013 at 11:43:35PM -0600, David Young wrote: >> Maybe we can avoid unnecessary locking or redundancy using a >> generation number? Add a generation number to the vmem_t, >> >> volatile uint64_t vm_gen; >> >> Increase a vmem_t's generation number every time that >> vmem_free(), vmem_xfree(), or vmem_backend_ready() is called: > > Won't that generate a very hot cache line on a large smp system? > Maybe the associated structures are actually worse here! But > per-cpu virtual address free lists might make sense. >
The quantum caches already do exacly this CPU local address caches. Allocation that aren't cached by the quantum caches don't happen that often. I like the idea of the generation counter, I see the possibility for a race here that can be closed this way. 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 v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlE2/J0ACgkQcxuYqjT7GRZspQCfVXwKsQaaarQVjoRoO0gye/pk yWIAnRsCiYK/FqAl/rZSPH7V3fTFFWlX =Cvhe -----END PGP SIGNATURE-----
