Re: [PATCH] Priority Lists for the RT mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Perez-Gonzalez, Inaky" wrote:
>
> >Oleg Nesterov wrote:
> >>
> >> Daniel Walker wrote:
> >> >
> >> > Description:
> >> > 	This patch adds the priority list data structure from Inaky Perez-Gonzalez
> >> > to the Preempt Real-Time mutex.
> >> >
> >> ...
> >And I think it is possible to simplify plist's design.
> >
> > ...
> >
> >lt_prio:
> >	list_add_tail(&new->prio_list, &pos->prio_list);
> >eq_prio:
> >	list_add_tail(&new->node_list, &pos->node_list);
> >}
>
> Isn't this adding them to *both* lists in the lt_prio
> case? I don't understand what do you want to accomplish
> in this case.

Yes. ->node_list contains *ALL* nodes, that is why we can:

	#define	plist_for_each(pos, head)	\
		 list_for_each_entry(pos, &(head)->node_list, node_list)

head <=======>  prio=1 <===> prio=2 <===> ...
                 /\        /|  /\
                 |         |   |
                 \/        |   \/
                prio=1     | prio=2
                 /\       /    /\
                 |       /     |
                 \/     /      \/
                prio=1 /      ....
                  <---/

                               /\
Where <===> means ->prio_list, |  ->node_list.
                               \/

Daniel Walker wrote:
>
> Make a patch .

Will do. However, I'm unfamiliar with Ingo's tree, so I
can send only new plist's implementation.

Oleg.
-
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]
  Powered by Linux