DragonFly submit List (threaded) for 2007-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [patch] UFS inode hash chain conversion to SLIST
:The attached patch is my attempt to convert the i_next field in struct
:inode to an SLIST. I'm not sure if I handled the initialization
:correctly or if I handled the ilast part of ufs_ihashins() correctly.
:It seems to me that a STAILQ may be a better choice since it seems
:like all insertions are done on the tail of the list (queue).
:Comments are welcome.
:
:Thanks,
:Joe
Well, there's no reason to kmalloc() little slist header chunks and
assign them to ihashtbl. Just make ihashtbl an array of slist headers.
But, apart from that, an SLIST is not a good idea here, because
deletions rescan the list (look at the mess SLIST_REMOVE() does in
sys/queue.h). A TAILQ would work ok, but I don't think there's a big
enough reason to change the code to a TAILQ when the manual singly linked
list works just fine.
-Matt
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]