Re: [PATCH][RFC] Linux VM hooks for advanced RDMA NICs

David Addison
2005-04-29T09:26:33Z

Benjamin Herrenschmidt wrote:
>>>+ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip)
>>>+{
>>>+ ip->next = mm->ioproc_ops;
>>>+ mm->ioproc_ops = ip;
>>>+
>>>+ return 0;
>>>+}
>>>+
>
> Why not use a list_head along with linux standard list primitives ?
>
> Ben.
>
>
The reason we didn't use the standard list primitives was that we wanted the normal
case where no ioproc ops were registered to have minimal impact and this just comes
down to mm->ioproc_ops being checked against being zero, which is slightly lighter weight
than using the list primitives.

Also entries are rarely removed from the list using the ioproc_deregister function as
in the normal case they get removed in the call to ioproc_release. Hence there is little
need for the doubly linked list.

Cheers,
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/