From mboxrd@z Thu Jan 1 00:00:00 1970 From: ali@internetdog.org (Ali Bahar) Date: Mon, 6 Jun 2011 10:19:57 +0800 Subject: kernel list data structure In-Reply-To: <20110606014734.GE15862@debian.debian> References: <20110606014734.GE15862@debian.debian> Message-ID: <20110606021957.GB15480@internetdog.org> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org > > "noop_data" has a reference to start point of bundles list, called > > "writeQueue" > > struct noop_data { > > struct list_head readQueue; > > struct list_head writeQueue; > > struct bundle bun; > > Why are you embedding a struct bundle here? This was my focus, too. In my previous mail, I said that this is wrong. But I think that there is another problem here as well: Amirali wants writeQueue to be the "start point of bundles list", but it won't. writeQueue is just a linked list (LL) of nodes of type 'struct noop_data'. (I am hoping that you, Jonathan, have more experience with this than me. What do you think?) Looking at the definition of list_head, it is just a pair of next-prev pointers. As such, 'head' is a misnomer. (I don't usually barge-in, criticizing, so don't bite my head off, please!) I need to dig a bit more into this. later, ali