On Dienstag, 27. September 2022 17:14:57 CEST Linus Heckemann wrote:
> Linus Heckemann writes:
> > static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
> > {
> >
> > V9fsState *s = pdu->s;
> > V9fsFidState *fidp;
> >
> > +GList *freeing;
> > +/* Get a list of all the values (
On Dienstag, 27. September 2022 16:25:03 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, e
Linus Heckemann writes:
> static void coroutine_fn virtfs_reset(V9fsPDU *pdu)
> {
> V9fsState *s = pdu->s;
> V9fsFidState *fidp;
> +GList *freeing;
> +/* Get a list of all the values (fid states) in the table, which we
> then... */
> +g_autoptr(GList) fids = g_hash_table_g
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