login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
23
Re: [RFC/PATCH 3/5] rt: plist_head_splice
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Peter Zijlstra <a.p.zijlstra@...>
To: Steven Rostedt <rostedt@...>
Cc: <linux-kernel@...>, Daniel Walker <dwalker@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, Gregory Haskins <ghaskins@...>, Oleg Nesterov <oleg@...>
Subject:
Re: [RFC/PATCH 3/5] rt: plist_head_splice
Date: Tuesday, October 23, 2007 - 12:26 pm
On Tue, 2007-10-23 at 11:10 -0400, Steven Rostedt wrote:
quoted text
> -- > On Tue, 23 Oct 2007, Peter Zijlstra wrote: > > + > > +void plist_head_splice(struct plist_head *src, struct plist_head *dst) > > +{ > > + struct plist_node *src_iter_first, *src_iter_last, *dst_iter; > > + struct plist_node *tail =3D container_of(dst, struct plist_node, plis=
t);
quoted text
> > + > > + dst_iter =3D next_prio(tail); > > + > > + while (!plist_head_empty(src) && dst_iter !=3D tail) { > > + src_iter_first =3D plist_first(src); > > + > > + src_iter_last =3D next_prio(src_iter_first); > > + src_iter_last =3D prev_node(src_iter_last); > > + > > + WARN_ON(src_iter_first->prio !=3D src_iter_last->prio); > > + WARN_ON(list_empty(&src_iter_first->plist.prio_list)); > > + > > + while (src_iter_first->prio > dst_iter->prio) { > > + dst_iter =3D next_prio(dst_iter); > > + if (dst_iter =3D=3D tail) > > + goto tail; > > + } > > + > > + list_del_init(&src_iter_first->plist.prio_list); > > + > > + if (src_iter_first->prio < dst_iter->prio) { >=20 > I may be confused here, but shouldn't we be linking the > src_iter_first->prio_list somewhere here? Doesn't all different prios nee=
d
quoted text
> to be in its separate prio_list? Otherwise two splices in a row can cause > the above WARN_ON (prio !=3D prio). >=20
quoted text
> > + list_add_tail(&src_iter_first->plist.node_list, > > + &dst_iter->plist.node_list);
Uhm, yeah, that was supposed the be prio_list indeed. Thanks!
quoted text
> > + } else if (src_iter_first->prio =3D=3D dst_iter->prio) { > > + dst_iter =3D next_prio(dst_iter); > > + } else BUG(); > > + > > + list_splice2_tail(&src_iter_first->plist.node_list, > > + &src_iter_last->plist.node_list, > > + &dst_iter->plist.node_list); > > + } > > + > > +tail: > > + list_splice_tail_init(&src->prio_list, &dst->prio_list); > > + list_splice_tail_init(&src->node_list, &dst->node_list); > > +} > > > > -- > > > > > >
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[RFC/PATCH 3/5] rt: plist_head_splice
, Peter Zijlstra
, (Tue Oct 23, 8:04 am)
Re: [RFC/PATCH 3/5] rt: plist_head_splice
, Steven Rostedt
, (Tue Oct 23, 11:10 am)
Re: [RFC/PATCH 3/5] rt: plist_head_splice
, Peter Zijlstra
, (Tue Oct 23, 1:45 pm)
Re: [RFC/PATCH 3/5] rt: plist_head_splice
, Peter Zijlstra
, (Tue Oct 23, 12:26 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Justin C. Sherrill
Re: pkgsrc bulk build and tiff
Jeremy Allison
Re: [RFC] Heads up on sys_fallocate()
Roland Dreier
Re: Integration of SCST in the mainstream Linux kernel
netbsd-tech-kern
:
Matt Thomas
Re: Add a MAP_ALIGNED flag for mmap(2).
Vsevolod Stakhov
Unicode support in iso9660.
Jaromir Dolecek
Re: Speeding up fork/wait path
matthew green
re: merge of freebsd eventhandler
git
:
dragonflybsd-user
:
Petr Janda
KDE and OpenSSL = Broken
sam
Re: Loader not found
Erick Perez
Re: dragonfly pdf documentation
Michel Talon
Re: Compatability with FreeBSD Ports [debian package tools]
Colocation donated by:
Who's online
There are currently
1 user
and
502 guests
online.
Online users
donkey99
Syndicate