[luau] applying patches to RH kernels, RH and 2.6 kernel

Warren Togami warren at togami.com
Thu Oct 9 20:40:02 PDT 2003


MonMotha wrote:
> 
> Generally, I've found that you either use the RH kernel or make your 
> own.  RH puts a BUNCH of patches on their kernels (they make the list 
> available somewhere, probably in the changelog or similar for the kernel 
> srpm) that will likely break any other patches you try to apply (since 
> the source tree is now so different that patch has no idea what to do).

Generally one downloads the .src.rpm file and unpacks it in order to see 
the thousands of patches that are applied.  The RH kernel is essentially 
a fork that stays ahead of the mainline vanilla kernel in some ways. 
Patching advanced features like preemption will not be trivial.

However... I thought RH's 2.4 kernel already did have preemption from a 
while ago.  I could be wrong.  In any case, interactivity issues you may 
be experiencing are probably due to the scheduler.

I personally use the 2.6 kernel, the latest versions have an EXCELLENT 
scheduler that makes almost all desktop things much smoother.  MP3 or 
OGG playback no longer skips for me during heavy disk operations or 
launching large programs.

http://people.redhat.com/arjanv/2.5/
I used to compile my own kernels, but these days I am using Arjan's 
2.6-test kernel RPMS from the URL above.  You can either install them 
manually, or use apt-get or yum to automatically download and install 
the latest version.  It takes a bit of extra configuration that is not 
trivial to explain, but after that configuration I have all features 
that I want on my Athlon laptop.  Full ACPI support and Powernow 
throttling with powernowd (daemon) brought my average temperatures down 
about 15 degrees C, while ALSA sound drivers are standard in this 
kernel, much greater quality sound support than the old OSS drivers. 
Your mileage may vary with the 2.6 kernel though... because you probably 
will need to write a /etc/rc.modules script in order to handle automatic 
module loading if certain features that aren't automatically inserted.

He is no longer publishing athlon specific kernels because he said that 
internal changes kernel no longer necessitate an athlon specific binary 
package.  My testing with my Athlon laptop seems to indicate this is 
true, as the i686 RPM works just as well as earlier athlon packages.

> 
> If you want a bunch of features that redhat lacks, it's probably best to 
> patch up your own kernel.  I do this whenever I decide it's time for a 
> new kernel, and I make the patch rollup available as MOLK (MonMotha's 
> Overloaded Linux Kernel).  Sometimes it can require quite a bit of work 
> to get 10 or so patches to apply to the same tree if they come anywhere 
> near touching the same aspects of the kernel (XFS and GrSecurity, for 
> example, do NOT get along since they both try to implement various forms 
> of ACLs).

Beware using a vanilla kernel on RH, because anything that requires db4 
(except rpm) will break without posix mutexes supplied by the NPTL 
kernel.  NPTL is the new threading model from the 2.6 kernel, backported 
in RH's 2.4 kernel.

> If you must run the RH kernel for whatever reason (support contract for 
> example), and you can't get your preferred patch to apply, you're likely 
> SOL unless you can convince RedHat to consider the patch for their next 
> wave of kernels.  You may also be able to get someone else to help you, 
> but if you've tried as hard as I am thinking you have, it's probably 
> very non-trivial to get this patch to apply (the preemptable kernel 
> touches some stuff that RedHat really likes to mess with such as the 
> scheduler).
> 

Yes, the scheduler in RH 2.4 kernel is O(1) backport from the 2.6 
kernel.  Quite a large and invasive change making novice patching of 
certain features not a trivial task.

Warren




More information about the LUAU mailing list