Prev: sched: adjust when cpu_active and cpuset configurations are updated during cpu on/offlining
Next: [PATCH][1/1] fs: wrong type for 'magic' argument in 'simple_fill_super()', fs/libfs.c
From: Peter Zijlstra on 3 Jun 2010 03:20 On Wed, 2010-06-02 at 14:11 -0700, Suresh Siddha wrote: > P SL > / \ / \ > N S ---> N S > / / \ / \ > C SL SR C SR > > If P needs to be removed, we need to re-augment S also in this case, > right? It looks like we are not handling this case. rb_augment_erase_begin(P) will return S if I read the code right, so rb_augment_path(S) will the re-augment S, SL, N. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Peter Zijlstra on 3 Jun 2010 03:50 On Thu, 2010-06-03 at 09:13 +0200, Peter Zijlstra wrote: > On Wed, 2010-06-02 at 14:11 -0700, Suresh Siddha wrote: > > P SL > > / \ / \ > > N S ---> N S > > / / \ / \ > > C SL SR C SR > > > > If P needs to be removed, we need to re-augment S also in this case, > > right? It looks like we are not handling this case. > > > rb_augment_erase_begin(P) will return S if I read the code right, so > rb_augment_path(S) will the re-augment S, SL, N. To be more explicit: P has two children, so we select the next entry, SL, as its substitute. Since SL doesn't have a right child we select its parent, S. If SL were to represent a subtree with a right child, then we'd select that, lets call it SLR. SLR would then end up being a direct descendant of S, and hence rb_augment_path(SLR) would still pass S on its way up. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Suresh Siddha on 3 Jun 2010 12:10
On Thu, 2010-06-03 at 00:48 -0700, Peter Zijlstra wrote: > On Thu, 2010-06-03 at 09:13 +0200, Peter Zijlstra wrote: > > On Wed, 2010-06-02 at 14:11 -0700, Suresh Siddha wrote: > > > P SL > > > / \ / \ > > > N S ---> N S > > > / / \ / \ > > > C SL SR C SR > > > > > > If P needs to be removed, we need to re-augment S also in this case, > > > right? It looks like we are not handling this case. > > > > > > rb_augment_erase_begin(P) will return S if I read the code right, so > > rb_augment_path(S) will the re-augment S, SL, N. > > To be more explicit: P has two children, so we select the next entry, > SL, as its substitute. Since SL doesn't have a right child we select its > parent, S. > > If SL were to represent a subtree with a right child, then we'd select > that, lets call it SLR. SLR would then end up being a direct descendant > of S, and hence rb_augment_path(SLR) would still pass S on its way up. Yep. I missed the rb_parent() part in the rb_augment_erase_begin(). Thanks. Acked-by: Suresh Siddha <suresh.b.siddha(a)intel.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |