From: Linus Torvalds <torvalds@linux-foundation.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] struct list_node
Date: Sun, 10 Jun 2007 10:20:20 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0706101013420.20321@woody.linux-foundation.org> (raw)
In-Reply-To: <1181452290.16428.7.camel@localhost.localdomain>
On Sun, 10 Jun 2007, Rusty Russell wrote:
>
> The current list.h has the same type for list elements and list heads
> even though most code and coders treat them as distinct.
I think the old list.h is technically superior to yours.
Exactly *because* nodes and heads are interchangeable.
In fact, you are incorrect that "most code" treat them as distinct. Most
code that uses list.h in fact uses it as a list of entries, often without
any head at all (and each *entry* is a point of removal), because the way
to actually *find* the structure that contains the lists is separate from
the lists themselves.
In other words, I think your patch is HORRIBLY BAD, because it totally
obscures the beauty of the current list.h implementation, and makes it be
something *average*.
The Linux kernel list.h is _better_ than most stupid list implementations
that think that a head node is different from the list node. Exactly
because it very naturally supports the notion of "this structure exists in
a 'ring of entries'" where each node is 100% equivalent to any other node,
and there _is_ no head.
And your patch totally misunderstands that, and breaks it.
Nack.
Linus
next prev parent reply other threads:[~2007-06-10 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-10 5:11 Rusty Russell
2007-06-10 17:13 ` Randy Dunlap
2007-06-10 17:20 ` Linus Torvalds [this message]
2007-06-10 20:19 ` Linus Torvalds
2007-06-11 0:08 ` Rusty Russell
2007-06-11 0:02 ` Rusty Russell
2007-06-14 10:03 ` Jan Blunck
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=alpine.LFD.0.98.0706101013420.20321@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®