Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How to use #2

Closed
libertyspike138 opened this Issue · 7 comments

3 participants

@libertyspike138

Wondering how to apply this patch.
I'm assuming you use the GNU patch program but on what file?

@graysky2
Owner

Just apply to the linux kernel source prior to build:
cd /path/to/source
patch -Np1 -i /path/to/kernel-38-gcc48-1.patch

@libertyspike138

Thank you for the quick reply! I have a couple more questions if you don't mind. Is this normal running the patch?
"Hunk #7 FAILED at 384."
I was looking for a way to optimize performance for my system that has 2 older netburst xeons (SL84B) in it so I had recompiled the kernel setting that cpu flag instead of the generic X86_64 but while benchmarking with hardinfo my results were the same. Would this patch help with that or only the new chipsets listed?
I'm assuming it would help with my (B840) cpu?
Thanks for your time!

@graysky2
Owner

That is odd. What version of the kernel are you trying to patch? For me, the patch applies cleanly into the the 3.8 source:

% cd /scratch/linux-3.8 && patch -Np1 -i kernel-38-gcc48-1.patch
patching file arch/x86/include/asm/module.h
patching file arch/x86/Kconfig.cpu
patching file arch/x86/Makefile
patching file arch/x86/Makefile_32.cpu

To your question: I dunno about hardinfo, see my README in the front of this github page for my results. Note that the differences were small - on the order of 250 ms in the best case... but those are statistically significant differences in all cases. Details and links to the script in the README.

@cmr
cmr commented

@libertyspike138 you should apply this patch before any other patches, ie to a vanilla release (3.x, not 3.x.y)

@graysky2
Owner

Refer to the linux-ck PKGBUILD in which the order is

Upstream version bump then this patch... it shouldn't matter though; if any of these file have changed in the version bump from upstream, either my patch will fail to apply, or if you patch the source first, their patch will fail.

@libertyspike138 - Safe to close this issue? Can you get the patch to apply to your 3.8 tree?

@libertyspike138

I'm currently on Ubuntu 12.04 which is Kernel 3.2.X.
After grabbing the clean source I patched it and compiled it. When I tried the autodetect optimizations in CPU make it spit a bunch of errors but when selecting the older xeon which was already an option before the patch I only got the one error but was still able to compile it and it is running.
I see no noticeable improvements though.
I will have to try again on the new PC when I get the chance to.

@graysky2
Owner

I do not believe this patch will apply to the 3.2 tree; it is meant for the 3.8 tree.

EDIT: Right
% tar Jxf linux-3.2.43.tar.xz && cd $_
% patch -Np1 -i kernel-38-gcc48-2.patch
patching file arch/x86/include/asm/module.h
Hunk #1 succeeded at 17 (offset 2 lines).
Hunk #2 succeeded at 45 (offset 2 lines).
patching file arch/x86/Kconfig.cpu
Hunk #1 succeeded at 147 (offset 8 lines).
Hunk #2 succeeded at 155 (offset 8 lines).
Hunk #3 succeeded at 163 (offset 8 lines).
Hunk #4 succeeded at 295 (offset 8 lines).
Hunk #5 succeeded at 313 (offset 8 lines).
Hunk #6 succeeded at 355 (offset 8 lines).
Hunk #7 FAILED at 384.
Hunk #8 succeeded at 453 (offset 38 lines).
Hunk #9 succeeded at 485 (offset 38 lines).
1 out of 9 hunks FAILED -- saving rejects to file arch/x86/Kconfig.cpu.rej
patching file arch/x86/Makefile
Hunk #1 succeeded at 50 with fuzz 1 (offset -7 lines).
patching file arch/x86/Makefile_32.cpu
Hunk #1 succeeded at 24 (offset 1 line).
Hunk #2 succeeded at 39 (offset 1 line).

@graysky2 graysky2 closed this
@graysky2 graysky2 added the question label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.