From: Greg KH <greg@kroah.com>
To: Ed L Cashin <ecashin@coraid.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ATA over Ethernet driver for 2.6.9
Date: Thu, 9 Dec 2004 08:40:20 -0800 [thread overview]
Message-ID: <20041209164020.GC12257@kroah.com> (raw)
In-Reply-To: <87k6rr5usu.fsf@coraid.com>
On Thu, Dec 09, 2004 at 10:57:05AM -0500, Ed L Cashin wrote:
> Greg KH <greg@kroah.com> writes:
>
> ...
> >> +typedef struct Bufq Bufq;
> >> +struct Bufq {
> >> + Buf *head, *tail;
> >> +};
> >
> > What's wrong with the in-kernel list structures that you need to create
> > your own?
>
> The Buf structures are singly linked (one next pointer). We could
> convert it to use list.h, but that would mean having another pointer
> per list element.
Is the extra overhead of another pointer worth the effort of ensuring
that your list handling code is correct in all cases? (hint, the answer
is usually no...)
The in-kernel list code is very well debugged, and does lots of extra
cpu lookup goodness if it can, ensuring that it is as fast as it
possibly can be. It's also much better to rely on in-kernel
datastructures as programmers can instantly recognize that you are using
that, and not have to worry about exactly how you call your own custom
list code, and if your list code is even correct in the first place.
So in short, unless this is a structure that is in dire need of a memory
savings, I really suggest you use the in-kernel stuff.
thanks,
greg k-h
next prev parent reply other threads:[~2004-12-09 16:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-06 15:51 [PATCH] ATA over Ethernet driver for 2.6.9 Ed L Cashin
2004-12-06 16:14 ` Arjan van de Ven
2004-12-10 16:19 ` Ed L Cashin
2004-12-06 16:21 ` Jan-Benedict Glaw
2004-12-06 16:11 ` Alan Cox
2004-12-06 17:06 ` Ed L Cashin
2004-12-07 13:00 ` Pavel Machek
2004-12-08 10:02 ` Helge Hafting
2004-12-08 15:44 ` Ed L Cashin
2004-12-08 15:53 ` Pavel Machek
2004-12-06 16:28 ` Adam Heath
2004-12-06 16:45 ` Ed L Cashin
2004-12-06 16:09 ` Alan Cox
2004-12-06 17:10 ` Adam Heath
2004-12-06 21:54 ` Greg KH
2004-12-09 15:48 ` Ed L Cashin
2004-12-09 16:37 ` Greg KH
2004-12-09 15:57 ` Ed L Cashin
2004-12-09 16:40 ` Greg KH [this message]
[not found] ` <87zn0n5vyd.fsf@coraid.com>
2004-12-09 16:42 ` Greg KH
2004-12-08 9:53 ` Pekka Enberg
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=20041209164020.GC12257@kroah.com \
--to=greg@kroah.com \
--cc=ecashin@coraid.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.