lkml.org 
[lkml]   [1999]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kmalloc
Alan Cox wrote:
>
> > alan@lxorguk.ukuu.org.uk (Alan Cox) writes:
> >
> > |> > Is kmalloc guaranteed to alloc a physically contigous buffer? My exact
> > |>
> > |> Yes
> >
> > No. It is only contiguous in the kernel virtual space.
>
> Thats vmalloc. If you have an architecture where kmalloc blocks are
> not linear to the I/O devices you'll have a very bad time making anything
> work

Call me nuts, but it _really_ bothers me that experienced kernel
developers can have disagreements about basic stuff. I blame the lack
of documentation. Where's vmalloc (and kmalloc) explained? I couldn't
find anything in the source.

Add to that Alan's mistake this morning about phys_to_virt() etc. and I
think we have a clear pattern: these people aren't dummies, so we can't
blame them, there just isn't adequate documentation.

This is going to bite us more and more as the developer pool gets
bigger.

I'm not flaming anyone (especially someone of Alan's stature), this kind
of mistake is happening repeatedly and is being made by the best
developers Linux can boast. I think we _have_ to recognise the
shortfalls in the current system. Undocumented source-code is fine if
you're sure people can find documentation somewhere...

Figuring out how to use a routine by looking at other code that uses it
is a BAD idea, but it's the path of least resistance (and the path to
bugs).

To summarise: good developers have some wrong ideas about some of the
basic building blocks of the kernel, and it's not fair to blame
individuals. This needs fixing.

Comments?

Neil
ps: if ever the FUD merchants needed ammo, incidents like these are
perfect.
pps: i'm quite sure MS suffer from similar problems, but let's not copy
'em.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site