4 ms·
I looked through the linux source net code and their usage is actually ubiquitous, but they are paired with hashes and trees. Storing your entire data in a link
by mrmuagi 7y ago
I looked through the linux source net code and their usage is actually ubiquitous, but they are paired with hashes and trees. Storing your entire data in a linked list, I agree is horrible, but using linked lists within a hash bucket for keeping entries was acceptable, but because of collision attack causing DDOS susceptibilities, trees were preferred moving forward.
When we talk about drivers, from my little exposure (mainly fixing kernel panics), DMA, and cyclical arrays for buffers, I don't recall seeing any linked lists in performant codepaths (it's common to use linked lists for an object pool, like descriptors, but these are O(1) because of tail operations (doubly linked)). But I did see descriptors being put onto cyclical buffers and deferenced, which is the same cost of a pointer deference in a linked list step traversal.