On Wed, 1 Jun 2005, Oleg Nesterov wrote:
> Daniel Walker wrote:
> >
> > On Wed, 1 Jun 2005, Oleg Nesterov wrote:
> >
> > > fifo? 2
> > > fifo? 1
> > > fifo? 0
> >
> > plist_for_each() wasn't designed to be FIFO , as you've discovered. That's
> > the slow method , you should test the fast method via pulling the nodes
> > off the front of the list.
>
> Sorry, I don't understand you. Could you please explain this to me?
plist_for_each() was just created to walk through all the nodes in the
list, There is no guaranteed ordering via that method. From your test it
appeared to be working since you printed all the nodes you inserted.
There are other methods like plist_first() which will give you FIFO
ordered nodes (or should) . The reason is that plist_first() pulls off the
dp_node , which is the first node inserted at that priority. All the other
nodes are inserted behind the dp_node. That's why I used list_add() and
not list_add_tail()
In your case node "2" should have been the dp_node .
Daniel
-
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]