Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Greg Kurz
Hi Linus, Thanks for this promising change ! On Mon, 05 Sep 2022 10:51:10 +0200 Linus Heckemann wrote: > Hi all, thanks for your reviews. > > > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > > V9fsTransport *t, > > s->ctx.fmode = fse->fmode; > > s->ctx.dm

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Christian Schoenebeck
On Montag, 5. September 2022 10:51:10 CEST Linus Heckemann wrote: > Hi all, thanks for your reviews. > > > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > > V9fsTransport *t,> > > s->ctx.fmode = fse->fmode; > > s->ctx.dmode = fse->dmode; > > > > -QSIMPLEQ

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Linus Heckemann
Hi all, thanks for your reviews. > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > V9fsTransport *t, > s->ctx.fmode = fse->fmode; > s->ctx.dmode = fse->dmode; > > -QSIMPLEQ_INIT(&s->fid_list); > +s->fids = g_hash_table_new(NULL, NULL); > qemu_co_

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Daniel P . Berrangé
In $SUBJECT it is called GHashTable, not GHashMap On Sat, Sep 03, 2022 at 05:03:27PM +0200, Linus Heckemann wrote: > The previous implementation would iterate over the fid table for > lookup operations, resulting in an operation with O(n) complexity on > the number of open files and poor cache loc

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-04 Thread Christian Schoenebeck
On Samstag, 3. September 2022 17:03:27 CEST Linus Heckemann wrote: > The previous implementation would iterate over the fid table for > lookup operations, resulting in an operation with O(n) complexity on > the number of open files and poor cache locality -- for nearly every > open, stat, read, wri

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-04 Thread Philippe Mathieu-Daudé via
Hi Linus, On 3/9/22 17:03, Linus Heckemann wrote: The previous implementation would iterate over the fid table for lookup operations, resulting in an operation with O(n) complexity on the number of open files and poor cache locality -- for nearly every open, stat, read, write, etc operation. Th