Results 1 to 2 of 2
I'm looking through the source code for the linked list in <linux/list.h> and I have a few questions. You should probably know that I've never done any kernel writing, and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-15-2011 #1
- Join Date
- Feb 2011
Questions about linked list
- What's rcu? And I'll probably need to know what "rcu protection" is too
- Why no payload? It seems that the payload is to take on struct list_head as member, but why do that? My best guess is that when forward-traversing a list, you don't need to perform any calculation to find the "next" member, because its address is that same as the node's. 'Doesn't seem all that beneficial, though.
- Why poison the next and prev when deleting a node? This seems awfully inefficient debug code. I might do such a thing in an application, but surround the code with #ifndef NDEBUG and then use asserts later. And why poison it to those values? Can there be no danger that those would be addresses assigned to pointers? As far as I know, the only thing you can be guaranteed will never be a pointer to an address is NULL.
- 02-27-2011 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
RCU - READ-COPY UPDATE - See the attached gzipped PDF.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!