All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-26 15:35 Dennis Grant
  2002-11-26 17:01 ` Kai Henningsen
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Dennis Grant @ 2002-11-26 15:35 UTC (permalink / raw)
  To: Alan Cox, Adrian Bunk, Richard B. Johnson,
	Linux Kernel Mailing List

> I think he missed the solution rather than missing the 
> problem 

I think I may agree with you, to a point, in that (after further reflection)
I think there's an intermediate step between the current state and the magical
world of "make partsconfig" or even "make autoconfig"

The real problem is the difficulty in mapping a given hardware configuration
to a kernel version and a subsequent kernel configuration. There's no smooth
road to get from one to the other. Paving that road solves the problem; the
only question is of degree. The "make autoconfig" case is the ideal, but we
don't necessarily need the ideal. Perfect is the enemy of good enough.

I started doing a little doodling, and I came up with a very rough sort of relationship
map. I don't present this as the ideal data model - it's a start point at best.


A "box" is composed of "devices" and "subcomponents"
A "subcomponent" is composed of "chipsets"
A "chipset" provides a set of "capabilities"
A "device" requires a  set of "capabilities"
A "chipset->capability::capablility<-device" pair defines an "interface"
An "interface" has associated with it:
   a) the kernel version where it first became availible
   b) the kernel config switches that activate it

So what is needed is some way to start at the "box" level, and given the set
of subcomponents and devices associated with it, spit out a list of a) and b)


Here's the mini-eureka I've had - that need not actually be a part of the kernel
config system, although the kernel config system might potentially make use
of it.

What would suffice would be some sort of online database, published in a highly
visible location, and crosslinked from hell and back to make it likely to be
discovered in a Google-driven troubleshooting session. Provide motherboard make
and model (a subcomponent) any expansion cards (also subcomponents) and the
make and model numbers of drives et al (devices) and then query the database
and present the report.

I'm envisioning something very much like the CDDB service. This is a little
more complex, but the concept is similar. And like the CDDB service, it could
be queried over the network by some future "make" option if somebody decided
to implement that.

Also like the CDDB service, it makes use of network effects. No one person has
to populate the _entire_ database. The association of "subcomponents" to "chipsets"
(or "devices" to "capabilities") might be done by the manufacturer, or it might
be done by the developer who actually debugged the original driver instance,
or it might even be done by someone like myself (a sufficiently clued-in sysadmin
who did it the hard way and wants to help those who will follow after him)

All that matters is that _somebody_ contribute one little portion of the mapping,
and then, given enough somebodies, the entire map assembles itself.

And if Microsoft hasn't dared attempt such a thing... well, then that would
make it an "innovation", wouldn't it? ;)

DG 

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-27 17:52 Dennis Grant
  2002-11-27 18:01 ` Alex Riesen
  0 siblings, 1 reply; 44+ messages in thread
From: Dennis Grant @ 2002-11-27 17:52 UTC (permalink / raw)
  To: Alan Cox, Linux Kernel Mailing List

>On Tue, 2002-11-26 at 19:28, Dennis Grant wrote:

>> Agreed - so then the association between "board" 
>> and "chipset" must be capable of being multi-valued,
>> and when there is a mult-valued match there must be 
>> some means of further interrogating the user (or user agent)
>> for more information.

> Much simpler to just include "modular everything" and let
> user space sort it out. Guess why every vendor takes this path

Oh, OK... Now I see what you're getting at.

Build a kernel where everything is a module, boot with some sort of absolute-bare-minimum
bootloader kernel, and then self-configure dynamically. Either to, from there,
generate a specific kernel config file from which to build a box-specific kernel
- or just to hell with it, and self-configure every time at boot.

Well... yeah. Assuming all the modules can autodetect, or that there's some
sort of sane userspace module loader doing autodetection, reading from a config
file, or both... yeah, that works.

I'll be honest - certain aspects of this offends some of my asthetics... but
that's not a requirement. Functionality is.

And with the assumption that all the modules needed, plus the mechanism to determine
if a given module is/is not loaded (and if loaded, how it is to be configured)
are availible on the box, this is 100% functional.

But....

I don't think this would have solved any of my problems.

I haven't had the opportunity to test it yet, but I have every confidence that
my ATA speed problems are a product of an incompletely-supported motherboard
chipset (wrt the kernel I compiled), and that once the 20-pre3+ac patches are
applied, that I'll have the correct drivers availible and everything will Just
Work. Certainly this was the case with the onboard Ethernet (I had to track
down a vendor driver, as it appears there is no support anywhere in a 2.4 series
kernel as of yet).

So even if 2.4.19 _had_ the "everything as modules" option, plus the required
userspace glue, you'd still be hearing from me, because there is no module there
to be autoloaded that matches my hardware.

And then there's still the issue of enough information being presented out of
the modules to allow one to examine the dmesg output from a boot and actually
determine that modules were missing (or missing features, or whatever)

So I think there's still a need for the hardware->kernel version+config database.
Perhaps the need for the query mechanism to generate an actual working kernel
config is less than I first imagined, but certainly the ability to generate
(if nothing else) the minimum kernel version required to support a give set
of hardware has value - it would have kept me away at least. :)

DG 

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-27 17:47 Mark H. Wood
  0 siblings, 0 replies; 44+ messages in thread
From: Mark H. Wood @ 2002-11-27 17:47 UTC (permalink / raw)
  To: Linux kernel list

On Tue, 26 Nov 2002, Otto Wyss wrote:
[snip]
> IMO each driver should be able (within resonable limits) to detect the
> hardware it is written for, returning a simple true/false. This way any
> driver could be asked if its hardware is available. With trial and error
> it should be possible to autodetect any hardware. This way there is no
> need for a centralize database. Of course if there is no driver one
> could ask that hardware never gets detected.

Please, no.  Try installing Microsoft Windows on some box if you want to
see this idea in action.  They've done it that way for years:  throw all
available drivers at the hardware and see which ones stick.  Pick a time
when you have a couple of hours to waste -- the process is agonizingly
slow.

Much better to simply ask each bus what's sitting on it.  Only non-PnP ISA
devices are unable to answer.  If the box has no ISA slots, then the
configuration can be done without any user intervention in a few
milliseconds.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
MS Windows *is* user-friendly, but only for certain values of "user".


^ permalink raw reply	[flat|nested] 44+ messages in thread
[parent not found: <fa.ivlir9v.u14v3p@ifi.uio.no>]
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-26 19:28 Dennis Grant
  2002-11-26 19:45 ` John Bradford
  2002-11-26 20:05 ` Alan Cox
  0 siblings, 2 replies; 44+ messages in thread
From: Dennis Grant @ 2002-11-26 19:28 UTC (permalink / raw)
  To: Alan Cox, dpaun, Rusty Lynch, trog, Linux Kernel Mailing List

>On Tue, 2002-11-26 at 18:04, Dimitrie O. Paun wrote:
>> On November 26, 2002 12:35 pm, Rusty Lynch wrote:

>>> So how would you deal with somebody contributing bogus 
>>> mappings? What if somebody was just wrong, or uploading a
>>> mapping in error?
 
>> The same applies to the kernel code, or any other open 
>> source project:  How do you deal with somebody contributing
>> bogus code?
 
>> Somehow things work out, as we have already witnessed.

> For boards its not that simple. Many vendors release multiple > utterly different
machines with the same box, bios and ident.
> The customer is told "IDE CD, 100mbit ethernet", the customer
> gets random cheapest going ethernet.

Agreed - so then the association between "board" and "chipset" must be capable
of being multi-valued, and when there is a mult-valued match there must be some
means of further interrogating the user (or user agent) for more information.


DG

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-26 17:57 Dennis Grant
  2002-11-26 18:11 ` Andrew Walrond
  0 siblings, 1 reply; 44+ messages in thread
From: Dennis Grant @ 2002-11-26 17:57 UTC (permalink / raw)
  To: Rusty Lynch, trog, Linux Kernel Mailing List

> So how would you deal with somebody contributing bogus 
> mappings? What if somebody was just wrong, or uploading a 
> mapping in error?

Well, then the next time somebody queried that mapping and got back the config,
it wouldn't work. And they'd either fix it, or complain to someone who would
fix it.

So its inherently self-correcting.

DG

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-26  9:15 Thomas Hood
  0 siblings, 0 replies; 44+ messages in thread
From: Thomas Hood @ 2002-11-26  9:15 UTC (permalink / raw)
  To: linux-kernel

> I am beginning to understand that you are really just a troll looking
> for trouble. However I will, again try to be nice and show you the
> errors of your ways.

I don't see how Dennis Grant's original message can be 
considered trollish.  It was very politely written, 
constructive, and on-topic.  Perhaps it is true that
some of the features he wants should be left up to
distributors, but his request for driver log messages
to be more detailed is reasonable.

My advice to Richard is to try not to feel offended.
Of the thousands of people reading a list like this, there
are always going to be one or two who reply after remembering
that they were supposed to buy more coffee yesterday ...

-- 
Thomas Hood


^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: A Kernel Configuration Tale of Woe
@ 2002-11-25 19:30 Dennis Grant
  2002-11-25 20:00 ` Richard B. Johnson
  2002-11-26 12:33 ` Andrew Walrond
  0 siblings, 2 replies; 44+ messages in thread
From: Dennis Grant @ 2002-11-25 19:30 UTC (permalink / raw)
  To: linux-kernel

>Richard B. Johnson wrote:

>> This is the linux-kernel list. Nothing you said has anything
>> to do with the linux-kernel. 

Oh really Richard?

Re-read the message. 

Point #1 has to do with kernel configuration; ie, "cd /usr/src/linux ; make
xconfig" and the choices made thereafter. I want something like "make modelnumberconfig"
that abstracts away most of the lower level items based on what low-level stuff
is associated with which chunk of hardware.*

I'm pretty sure any time you're invoking the kernel Makefile that you're discussing
a "linux kernel issue"

Point #2 has to do with the messages that drivers, modules, and other bits of
kernel code print to the dmesg data store wrt how they are currently set up
- in other words, kernel state information. The last time I checked, these messages
were contained inside the kernel source - I remember looking through "ide.c"
looking to see what the "idebus=xx" parameter really controlled, and if it had
anything to do with the ATAxx values (as it turns out, it does not, although
my Googling indicates that this seems to be a common misconception)

So this, as well, is entirely appropriate material for linux-kernel.

Point #3 has to do with the issues in publishing where what hardware is supported
in what kernel version, and where drivers not currently contained in the vanilla
kernel are located. Put another way, point #3 is about locating the output of
the work of people "employed" on linux-kernel, and so is also entirely appropriate.


That you are knee-jerk flaming a legitimate message that is entirely on-topic
indicates that you didn't actually read the message, and instead fixated on
one or two statements contained within itand made assumptions from there. That
doesn't seem like good kernel developer practice - perhaps you were looking
for Slashdot?

-------------
* I saw one response from a gentleman who indicated that the low-level hardware
associated with a given "high-level" part number may well change during the
life of the part, and that this poses difficulty. I agree. I also think that
"perfect is the enemy of good enough" and that a case where you can abstract
away the underlying complexity for 90% of the people is probably good enough;
especially if there is some sort of feedback mechanism whereby running changes
to "high level" part numbers (and the related "low-level" kernel module associations)
can be updated in short order.

For the gentleman who posted examples of ATA dmesg output that duplicated very
nearly what I was asking for, mine didn't do that. I'll take that (very specific)
issue up in a later thread when I have access to the dmesg output from my machine.


DG

^ permalink raw reply	[flat|nested] 44+ messages in thread
* A Kernel Configuration Tale of Woe
@ 2002-11-25 17:33 Dennis Grant
  2002-11-25 18:10 ` Richard B. Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Dennis Grant @ 2002-11-25 17:33 UTC (permalink / raw)
  To: linux-kernel


Gentlemen,

I have a tale to tell you. It is, I'm afraid, a little long, but it contains
within it a couple of messages that I really think need to be communicated from
us troops in the trenches up to you Generals of Kernel Hacking. I hope you'll
indulge me for a few minutes.

This past week, it was decided that the family P1-233 based Linux box (a RH5
box that had been upgraded through RH7.2) was no longer suitable for use as
a desktop workstation, and a replacement was in order. To that end, the following
system was specced out, ordered, and assembled:

- Asus A7V8X motherboard (10/100 onboard LAN, ATA 133, onboard sound, no RAID,
no Serial ATA)
- 512 Mb of 333MHz RAM
- Athlon 2100+
- Maxtor ATA133, 7200 RPM, 30 Gb hard drive
- some generic ATA CD-ROM capable of UDMA2

Into this box was brought over (from the previous machine) 
- PCI-based GeForce MX 400
- DC10+ video capture card

RH8 was installed on this system (a brilliant distro BTW, my compliments to
the RH crew) and it booted and installed just fine. So far, so good.

Next it came to getting all the various devices working, and here's where the
tale of woe starts in earnest.

Let me first state that I am a UNIX professional. I am not at all intimidated
by having to configure and compile a kernel. While I don't have the internal
design of the kernal internalized like many of you do, I have enough of a clue
to be able to do troubleshooting and I can (and do) RTFM. In a pinch, I can
even open up a kernel source file and not be totally lost.

I also understand that the hardware I have is a little on the "bleeding edge"
end of the spectrum - perhaps not so much in terms of the technology, but rather
on the age of the underlying chipsets. So it doesn't bother me that (for example)
the onboard Ethernet chip didn't have a driver in the vanilla 2.4.19 source
that I downloaded. Those that wish to have the latest and greatest must be prepared
to accept that not everything they need is necessarily ready for them _right
now_.

But after this past weekend's horror movie, I wish to make 3 points and impassioned
pleas to all y'all.

1) The current kernel configuration process is overly complex for initial configuration
of new hardware. There needs to be some sort of higher-level configuration level
that addresses kernel subsystems on a "hardware component" level rather than
an individual chip driver level.

What I want is some sort of configuration interface that lets me enter or select
my hardware components on an "item" level by manufacturer and model number rather
than what the thing is actually made of.

This could be a GUI, but doesn't need to be.

For example, I want to be able to pick my motherboard model out of a list. I
then want to be presented with a list of components that are options on that
model on an ITEM basis (ie "gigabit ethernet controller" not "Broadcom FOOBAR73541")
and then select the options that I have. Then do the same thing for the hard
drives, PCI cards, etc. For some items (hard drives in particular) it may make
sense to generalize a little bit rather than specify exact model numbers, but
I'm thinking on terms of OPERATIONAL characteristics "ATA133, 80 pin cable"


And then the process beetles off and configures as much of the kernel as it
can according to these selections.

That probably would not be entirely sufficient to _fully_ configure the kernel,
and so it would still probably be necessary to do a usual "make xconfig" (or
whatever fooconfig) on top of that (to handle filesystem drivers, etc) but at
least I'd know that the hardware had been configured correctly.

I'm not asking that the current granularity be removed. I want another layer
on top of that current layer to abstract away a lot of the little niggling details
that turn out to be so bloody important in actually getting stuff to work.

2) The driver load messages that are retrieved via dmesg often lack proper indication
of state - and it makes troubleshooting a SERIOUS PITA. The offender that sticks
most in my craw at the moment is ATA  - the motherboard supports ATA133. The
drive supports ATA133. I want the damned thing to function in an "ATA133" mode
but I cannot tell if it is doing that or not. All I know is that the drive is
reported as an ATA drive, and that 'hdparm -Tt /dev/hda' reports 7.5 Mb/sec
- which I think is low, but I don't know for sure.

What I want is the message that reports the drive and the interface to say things
like 

"ATA133-capable interface ide0 detected
ide0 running in ATA33 mode (use ide0=ataxxx to change)
Drive hda is a FooBar 123abc (ATA33, ATA66, ATA100, ATA133)
hda is in ATA33 mode
Drive cable not autodetected - need 80 pin cable for ATA100+
Assuming 40 pin cable (use ide0_cable=80 to change)"

The actual verbage is subject for discussion, but if item FOO has more than
one possible state, then please please PLEASE specify what state it is in, and
if there is a way to change that state via a command line parameter or whatever,
state that too.

As it sits right now, it seems I can flip switches 'till doomsday and never
realize where the problem lies - if, indeed there even IS a problem.

3) There really needs to be some sort of centralized hardware database with
a web-based query mechanism that can point people to what drivers are availible
for which hardware, and if they are included in a given kernel version (or not)
and if not, where they can be found. If this already exists, it needs to be
made a hell of a lot more visible and crosslinked from more places, because
I sure never found it - and Google is my friend. I found the Broadcom-supplied
driver for the onboard LAN by pure stupid dumb luck, and I never did find a
sound driver (I had to go to opensound and download their binary drivers to
get sound working - ick!)

Thanks for reading this far on my little rant. I really do appreciate all the
work y'all do, and the quality and performance has come a long way since I first
dipped my toes into Linux back in '97. But damn, three days of my life are gone,
and I still don't have everything working and in many cases I don't know why.
(I'll cover individual issues in separate threads later on.)

Thanks again for reading,

DG 


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2002-11-29 10:13 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-26 15:35 A Kernel Configuration Tale of Woe Dennis Grant
2002-11-26 17:01 ` Kai Henningsen
2002-11-26 17:35 ` Rusty Lynch
2002-11-26 18:04   ` Dimitrie O. Paun
2002-11-26 18:46     ` Alan Cox
2002-11-26 18:48 ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2002-11-27 17:52 Dennis Grant
2002-11-27 18:01 ` Alex Riesen
2002-11-27 17:47 Mark H. Wood
     [not found] <fa.ivlir9v.u14v3p@ifi.uio.no>
     [not found] ` <fa.gaum5rv.1j3snhh@ifi.uio.no>
2002-11-27  8:43   ` Giacomo Catenazzi
2002-11-27 10:12     ` John Bradford
2002-11-26 19:28 Dennis Grant
2002-11-26 19:45 ` John Bradford
2002-11-27 10:55   ` Keith Owens
2002-11-27 12:03     ` Roman Zippel
2002-11-27 12:19       ` Keith Owens
2002-11-27 19:01         ` Sam Ravnborg
2002-11-27 19:14         ` Kai Germaschewski
2002-11-26 20:05 ` Alan Cox
2002-11-26 23:21   ` Roger Gammans
2002-11-27  6:10     ` Greg KH
2002-11-26 17:57 Dennis Grant
2002-11-26 18:11 ` Andrew Walrond
2002-11-26 18:24   ` Rusty Lynch
2002-11-26 23:46     ` Lee Leahu
2002-11-26  9:15 Thomas Hood
2002-11-25 19:30 Dennis Grant
2002-11-25 20:00 ` Richard B. Johnson
2002-11-26 10:57   ` Adrian Bunk
2002-11-26 14:44     ` Alan Cox
2002-11-26 12:33 ` Andrew Walrond
2002-11-28 22:09   ` LA Walsh
2002-11-29  1:28     ` Miles Bader
2002-11-29 10:04       ` Andrew Walrond
2002-11-29 10:21         ` Miles Bader
2002-11-25 17:33 Dennis Grant
2002-11-25 18:10 ` Richard B. Johnson
2002-11-25 18:58   ` Samuel Flory
2002-11-26 16:58   ` Kai Henningsen
2002-11-26  4:24 ` Theodore Ts'o
2002-11-26  8:21 ` john slee
2002-11-26  8:35   ` Brad Hards
2002-11-26 19:59     ` Otto Wyss
2002-11-27  0:29       ` Alan Cox

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.