Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-22 Thread Christian Schoenebeck
On Donnerstag, 22. September 2022 13:43:56 CEST Linus Heckemann wrote: > Christian Schoenebeck writes: > > On Freitag, 9. September 2022 15:10:48 CEST Christian Schoenebeck wrote: > >> On Donnerstag, 8. September 2022 13:23:53 CEST Linus Heckemann wrote: > >> > The previous implementation would it

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-22 Thread Linus Heckemann
Christian Schoenebeck writes: > On Freitag, 9. September 2022 15:10:48 CEST Christian Schoenebeck wrote: >> On Donnerstag, 8. September 2022 13:23:53 CEST Linus Heckemann wrote: >> > The previous implementation would iterate over the fid table for >> > lookup operations, resulting in an operati

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-19 Thread Christian Schoenebeck
On Freitag, 9. September 2022 15:10:48 CEST Christian Schoenebeck wrote: > On Donnerstag, 8. September 2022 13:23:53 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 numb

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-09 Thread Christian Schoenebeck
On Donnerstag, 8. September 2022 13:23:53 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 every open, > stat, read, write,

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 Thread Linus Heckemann
(sorry for the dup @Greg, forgot to reply-all) Greg Kurz writes: >> > g_hash_table_steal_extended() [1] actually allows to do just that. >> >> g_hash_table_steal_extended unfortunately isn't available since it was >> introduced in glib 2.58 and we're maintaining compatibility to 2.56. >> > > Ha

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 Thread Greg Kurz
On Thu, 08 Sep 2022 18:10:28 +0200 Linus Heckemann wrote: > (sorry for the dup @Greg, forgot to reply-all) > > Greg Kurz writes: > >> > g_hash_table_steal_extended() [1] actually allows to do just that. > >> > >> g_hash_table_steal_extended unfortunately isn't available since it was > >> intro

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 Thread Greg Kurz
On Thu, 8 Sep 2022 13:23:53 +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 locality -- for every open, > stat, read, write, etc operat

[PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 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 every open, stat, read, write, etc operation. This change uses a hashtable for this instead, significantly i