Re: [Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-19 Thread Emilio G. Cota
Hi Alex, I'm sending a v3 in a few minutes. I've addressed all your comments there, so I won't duplicate them here; please find inline my replies to some questions you raised. On Fri, Apr 08, 2016 at 11:27:19 +0100, Alex Bennée wrote: > Emilio G. Cota writes: (snip) > > +/* call only when there

Re: [Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > This is a hash table with optional auto-resizing and MRU promotion for > reads and writes. Its implementation goal is to stay fast while > scaling for read-mostly workloads. > > A hash table with these features will be necessary for the scalability > of the ongoing MTTCG

Re: [Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-05 Thread Richard Henderson
On 04/04/2016 10:30 PM, Emilio G. Cota wrote: +struct qht_map { +struct qht_bucket *buckets; +uint64_t n; +uint64_t n_items; +uint64_t n_items_threshold; +struct rcu_head rcu; +}; There's no point in using 64-bit data for a 32-bit host. You should be using e.g. size_t for th

Re: [Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-05 Thread Paolo Bonzini
On 05/04/2016 07:30, Emilio G. Cota wrote: > +static void qht_bucket_reset(struct qht_bucket *b) > +{ > +qemu_spinlock_lock(&b->lock); > +seqlock_write_begin(&b->sequence); > +__qht_bucket_reset(b); No __ names, please use names like qht_bucket_reset_locked. "_locked" doesn't make mu

[Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-04 Thread Emilio G. Cota
This is a hash table with optional auto-resizing and MRU promotion for reads and writes. Its implementation goal is to stay fast while scaling for read-mostly workloads. A hash table with these features will be necessary for the scalability of the ongoing MTTCG work; before those changes arrive we