From: Con Kolivas <kernel@kolivas.org>
To: Werner Almesberger <werner@almesberger.net>
Cc: Rajesh Venkatasubramanian <vrajesh@umich.edu>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Generalized prio_tree, revisited
Date: Thu, 16 Dec 2004 20:02:19 +1100 [thread overview]
Message-ID: <41C14F1B.8000401@kolivas.org> (raw)
In-Reply-To: <20041216053118.M1229@almesberger.net>
[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]
Werner Almesberger wrote:
> did you have a chance to look at the prio_tree generalization ?
>
> I've attached the patch I posted a month ago (plus the trivial
> "const" change). It's for 2.6.9, but also applies to 2.6.10-rc2,
> which I've been using for a good while now.
>
> The patch splits the radix priority search trees into two types:
> the "raw" one with implicit keys, as it's currently used, and a
> new, generalized one with explicit keys, which should be used by
> new code.
> struct prio_tree_root {
> struct prio_tree_node *prio_tree_node;
> - unsigned int index_bits;
> + unsigned short index_bits;
> + unsigned short raw;
> + /*
> + * 0: nodes are of type struct prio_tree_node
> + * 1: nodes are of type raw_prio_tree_node
> + */
> };
> - INIT_PRIO_TREE_ROOT(&inode->i_data.i_mmap);
> + INIT_PRIO_TREE_ROOT(&inode->i_data.i_mmap, 1);
While not being able to comment on the actual patch I think having a 1
or 0 for different types is not clear. Naming them different struct
names would seem to me much more readable.
Cheers,
Con
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
next prev parent reply other threads:[~2004-12-16 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-16 8:31 [RFC] Generalized prio_tree, revisited Werner Almesberger
2004-12-16 9:02 ` Con Kolivas [this message]
2004-12-16 9:15 ` Werner Almesberger
2004-12-16 9:33 ` Con Kolivas
2004-12-16 13:23 ` Werner Almesberger
2004-12-16 11:12 ` Rajesh Venkatasubramanian
2004-12-16 13:57 ` Werner Almesberger
2004-12-16 15:04 ` Rajesh Venkatasubramanian
2004-12-16 19:38 ` Werner Almesberger
2004-12-16 20:01 ` Rajesh Venkatasubramanian
2004-12-17 4:44 ` Werner Almesberger
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=41C14F1B.8000401@kolivas.org \
--to=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vrajesh@umich.edu \
--cc=werner@almesberger.net \
/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