From our experience in other distros, this led to bootstrapping problems due to
https://bugzilla.novell.com/show_bug.cgi?id=231171#c41
--- Comment #41 from andy ritger 2007-11-23 14:39:59 MST ---
Hi Danny,
Yes, you understand the current state of the NVIDIA driver correctly.
There is a lot of history, here. Stefan may have additional records
on some of this, as he and Greg K-H and I exchanged some correspondence
on this back in 2005 (I've pasted some of that below).
I've not tracked sysfs/udev development recently, but back in 2005 device
file management in the NVIDIA driver was quite difficult:
- large maintenance burden for NVIDIA, trying to interface properly
with the varying device file creation schemes across all the various
distributions
- devfs/udev interfaces in the Linux kernel changed frequently and
often required driver updates
- there plans to make the interfaces for hotplug/udev sysfs support
to be exported GPL-only
- with various kernel versions, device file creation through udev had
substantial latency
It is entirely possible that the device file creation interfaces exposed
in recent kernels have matured and stabilized and are standardized across
Linux distributions since we last looked at this seriously.
However, NVIDIA's current solution of creating the device files from
user space has been quite robust over the past few years and required
minimal maintenance work for us. We can definitely investigate making
use of newer interfaces if there are strong benefits, but I would need
help to understand what the interfaces are, and to understand when the
new interfaces should be used.
I've included some past exchanges Stefan, Greg, and me. The end result
strongly encouraged NVIDIA to create the device files from user space.
Thanks,
- Andy
----
Stefan Dirsch:
Andy, I wonder whether the nvidia video driver is udev-aware. Could you please
comment on this?
Greg thinks so:
"In looking at the latest nvidia source tarball I could find, they
already have code that calls class_simple_* which creates the entries
needed in sysfs for udev to create the device nodes. So I don't think
you have to do anything special, if you already have their latest
release."
Additional Comment #1 From Andy Ritger 2005-03-04 16:11 MST [reply]
Yes, the NVIDIA driver is udev-aware.
I should point out, though, some problems we encountered with udev:
- it appears that device files do not get created until sometime after the
kernel module is loaded
- the kernel module is supposed to be autoloaded when the device files are
opened
this circular dependency. The 716x driver you have breaks this circular
dependency by explicitly loading the kernel module from the X driver during X
initialization. Our makedevices.sh script that runs during installation also
creates device files in /etc/udev/devices/, which I believe get propogated to
/dev/ by the OS, but I am not sure how configuration or distribution specific
that is.
All in all, NVIDIA's experience with udev has not been impressive. Hopefully
that is just to due to bugs in the initial udev deployments we've seen.
Thanks.
Additional Comment #2 From Greg Kroah-Hartman 2005-03-04 16:43 MST [reply]
Feedback from nvidia, to the udev developers about the issues they have with
it,
would be greatly appreciated. They can be contacted on the linux-hotplug-devel
mailing list, or by direct email to the address in the README file in the udev
releases.
Otherwise, such issues will remain unknown, and hence, unfixed by the udev
developers :)
Additional Comment #3 From Andy Ritger 2005-04-06 08:18 MST [reply]
Setting resolution to WorksForMe; not sure if that is the most appropriate
setting.
Additional Comment #4 From Stefan Dirsch 2005-04-06 08:21 MST [reply]
Perfectly ok for me. Up to now I didn't hear from any udev related problems
with
the nvidia driver. We can reopen it again, in case there are any. I would like
to thank you for commenting on this.
Additional Comment #5 From Andy Ritger 2005-04-06 12:33 MST [reply]
Based on recent developments, though, I wonder why this question was asked. If
the class_simple interface is going to not be available to the NVIDIA driver in
future kernels, what good does it do for the NVIDIA kernel module to be udev
aware?
Additional Comment #6 From Stefan Dirsch 2005-04-06 13:07 MST [reply]
I asked this question since we somewhat switched to udev with SUSE 9.3. I
can't comment on the technical details (class_simple interface) since I'm
not a kernel developer. Hopefully Greg can ...
Additional Comment #7 From Greg Kroah-Hartman 2005-04-06 13:27 MST [reply]
The in-kernel apis have changed again, yes. But that code hasn't made it into
mainline, and will not until some unspecified time after 2.6.12 is released.
If nvidia's license isn't compatible with them, there's nothing I can do about
it, sorry.
Additional Comment #8 From Andy Ritger 2005-04-06 14:28 MST [reply]
Thanks, Greg.
All my previous experience with SuSE/Novell has been so positive, I'm
disappointed to see that attitude taken.
Stefan, to (re)answer your original question: NVIDIA is aware of udev, in that
we are aware of its existence and attempt to use it when possible. However,
apparently we will not be permitted to use udev in the future.
Additional Comment #9 From Greg Kroah-Hartman 2005-04-06 14:47 MST [reply]
I'm sorry, but this is not a SuSE/Novell attitude at all. It is the
"linux kernel developer" hat that I must wear. I have held people off on
marking
the class_simple() code as GPL only for much longer than I ever expected it to
be able to be done, it was only a matter of time.
Sorry for any trouble this might have caused, and good luck with maintaining
a kernel driver outside of the kernel tree, I know it is quite difficult and
time-consuming.
Legally, I have no idea how you are getting away with doing what you have done
so far, but hey, that's why I'm not a lawyer :)
Additional Comment #10 From Andy Ritger 2005-04-06 17:14 MST [reply]
Understood, thanks.
Stefan: I guess just be aware that the NVIDIA driver may not be able to utilize
udev in the future. We're investigating other solutions.
Additional Comment #11 From Greg Kroah-Hartman 2005-04-07 03:21 MST [reply]
You might want to look at how vmware handles a udev system, without using
sysfs or udev at all. They create their nodes statically in their startup
script
which is a valid way to handle this.
Additional Comment #12 From Stefan Dirsch 2005-04-07 03:31 MST [reply]
Thanke for the hint, Greg. I think this is something I should take care of.
Additional Comment #13 From Stefan Dirsch 2005-04-07 09:01 MST [reply]
Andy, this is now discussed internally here at SuSE. We'll let you know about
the results ASAP.
------
Greg K-H:
class_simple is now gone in the latest -mm
releases. I've reworked the core class code to
work much like class_simple used to work, and
fixed up a number of issues along the way. The
other class apis will be removed so that the new
class functions are all that is left. This will
take a while, but is a good thing as the new
functions are much easier to use, understand, and
more importantly, almost impossible to use
incorrectly. This code will not go into mainline
until after 2.6.12 is released.
The new functions are marked EXPORT_SYMBOL_GPL(),
so code like nvidia and vmware can't use them.
The entire driver core and sysfs was marked this
way a while ago (September 2004 to be exact), but
the class_simple code was not marked as such
because people complained that there was no
warning (and they didn't like their closed source
modules breaking.) They have had such warning now
for a while, and vmware now no longer uses these
functions at all.
As the class_simple functions were tiny wrappers
around the core class code, people argued a lot
with me that they were circumventing the GPL
markings of the driver code, and I agreed.
nvidia can modify their startup scripts to just
statically create the device nodes, just like
vmware does, to have them work properly on a udev
aware distro (in fact, that's what they used to do
a while ago...) That will solve the issue for them
of not being able to export any device major:minor
number information in sysfs for udev to pick up
on.
I hope this helps clear up any confusion, and
provides a solution for what nvidia can do to work
with future releases from us.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.