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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]