From: Zach Brown <zach.brown@oracle.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: akpm@osdl.org, andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Shrink rbtree
Date: Fri, 21 Apr 2006 12:25:56 -0700 [thread overview]
Message-ID: <444931C4.9020502@oracle.com> (raw)
In-Reply-To: <1145646412.11909.218.camel@pmac.infradead.org>
> Maybe. I thought I'd actually done it once before, but I couldn't
> actually find it when I went looking.
Yeah, that's what I remember too.
> Plenty more words in the git commit.
Ah! of course, thanks.
> They don't make much sense without
> the patch right below them, and you can see them in juxtaposition at
> http://git.infradead.org/?p=users/dwmw2/rbtree-2.6.git;a=commitdiff;h=1975e59375756da4ff4e6e7d12f67485e813ace0
Indeed, that reasoning looks sound. First the if (parent) .. else {}
falls away, then the parent left/right relationship is folded into the
test with old. Looks good.
> I think it's be better just to drop the RB_RED and RB_BLACK definitions.
I'd agree, I figured you'd left them for a reason.
>>> +static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
>>> +{
>> BUG_ON((unsigned long)p & 3);
>
> Yeah, I suppose we could.
>>> + node->rb_parent_colour = (unsigned long )parent;
>> use rb_set_parent(node, parent) and get the assertion.
>
> Que?
I meant that if we add the BUG_ON() to rb_set_parent() then we might as
well reuse it here..
- z
next prev parent reply other threads:[~2006-04-21 19:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-21 12:47 [PATCH] Shrink rbtree David Woodhouse
2006-04-21 13:06 ` Nick Piggin
2006-04-21 19:08 ` David Woodhouse
2006-04-21 20:57 ` Hugh Dickins
2006-04-21 22:12 ` David Woodhouse
2006-04-23 13:03 ` Hugh Dickins
2006-04-21 18:24 ` Zach Brown
2006-04-21 19:06 ` David Woodhouse
2006-04-21 19:25 ` Zach Brown [this message]
2006-04-22 1:09 ` Andrew Morton
2006-04-22 1:10 ` Andrew Morton
2006-04-22 1:21 ` Andrew Morton
2006-04-22 1:29 ` David Woodhouse
2006-04-22 12:29 ` Ingo Oeser
2006-04-22 13:38 ` David Woodhouse
2006-04-22 22:55 ` Ingo Oeser
2006-04-23 16:36 ` Steven Rostedt
2006-04-23 17:20 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444931C4.9020502@oracle.com \
--to=zach.brown@oracle.com \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox