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; > >

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; > > > > -

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(>fid_list); > +s->fids = g_hash_table_new(NULL, NULL); >

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

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,

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.

[PATCH] 9pfs: use GHashMap for fid table

2022-09-03 Thread Linus Heckemann
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. This change uses a hashtable for this instead,