Thread (10 messages) 10 messages, 3 authors, 2011-06-13

kernel list data structure

From: Ali Bahar <hidden>
Date: 2011-06-06 01:59:14

Hi Amirali,
implemented a two-dimensioned list, using what I understood about kernel
list.  But as I debugged my code, it seems that my concept is wrong. Would
anyone guide me how to implement a two-dimensioned list, or introduce me a
manual to learn about it more?
I'm definitely on the newb end of things as far as kernel data
structures go. So getting another opinion would be prudent.

As for a manual, Wolfgang Mauerer's book, Professional Linux Kernel
Architecture, is an excellent resource. It does touch on double
linked-lists (LL), though I've only glanced at it.

 
"noop_data" has a reference to start point of bundles list, called
"writeQueue"
I don't think so. See below.

struct bundle {
    struct list_head bundlesQueue;
    struct list_head reqsQueue;
What I see here is that you are putting such nodes on 2 LLs.

 
struct noop_data {
    struct list_head readQueue;
    struct list_head writeQueue;
What I see here is that you are putting such nodes on 2 LLs, but
    struct bundle bun;
each node has a single node of the type 'struct bundle' ie a struct
which has
    int bundleNumber;
    int size;
    ...
    int filled[8];

Likely, this is not what you want.

later,
ali
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help