# GCC opts & BFQ gone in 3.15.0-gentoo-sources?[in 3.15.2]

## wrc1944

The GCC optimizations and BFQ "experimental" patches are apparently removed in 3.15.0.

Very disappointing, if this is true.  I've been very happy using these on 5 different Gentoo boxes on every single gentoo-sources kernel released with them, with never any problem.  IMO, this is the best feature to hit gentoo-sources since I first started running gentoo 12 years ago!  The GCC "native" option could be the default as far as I'm concerned, and for my desktop responsiveness BFQ is noticeably better than CFQ.  

The "experimental" USE flag was a great addition, letting kernel builders tune to their cpu in a very convenient manner.

Are these patches really gone?   :Surprised:      Say it ain't so!   :Confused: 

----------

## wrc1944

Hmmmm....

The 3.14.6 and 3.15.0 gentoo-sources ebuilds are identical, except in 3.15.0 under the lines K_WANT_GENPATCHES= and IUSE= "experimental" is left out. 

Is it that the patches really are being permanently dropped, or that the new patch versions (if required) for 3.15.0 aren't yet ready?

Could users download patches here and adapt them for the 3.15.x branch (if they knew what they were doing)?  

http://sources.gentoo.org/cgi-bin/viewvc.cgi/linux-patches/genpatches-2.6/trunk/3.14

----------

## kernelOfTruth

the cpu optimizations should (hopefully) work with 3.15 (as long as not much changed in the Makefiles, which usually doesn't)

as for BFQ:

http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php

http://algo.ing.unimo.it/people/paolo/disk_sched/patches/3.15.0-v7r4/

----------

## nlsa8z6zoz7lyih3ap

 *Quote:*   

> Are these patches really gone?

 

I don't know the answer, but in at least one previous kernel they weren't in the gentoo-sources-3.x.0 when it was released initially, but appeared a few days later.

Perhaps this will be the case here too.

----------

## carlosalvatore

 *wrc1944 wrote:*   

> Hmmmm....
> 
> The 3.14.6 and 3.15.0 gentoo-sources ebuilds are identical, except in 3.15.0 under the lines K_WANT_GENPATCHES= and IUSE= "experimental" is left out. 
> 
> Is it that the patches really are being permanently dropped, or that the new patch versions (if required) for 3.15.0 aren't yet ready?
> ...

 

With kernel 3.15.0 i got no WiFi. Despite ath9x_htc being compiled in the kernel and no apparent errors occurring, wireless adapter won't associate with the AP. Under 3.14.6 there are no problems.   :Confused: 

----------

## Hu

 *carlosalvatore wrote:*   

> 
> 
> With kernel 3.15.0 i got no WiFi. Despite ath9x_htc being compiled in the kernel and no apparent errors occurring, wireless adapter won't associate with the AP. Under 3.14.6 there are no problems.  

 Such a regression is unfortunate, but why are you reporting it here?  As I read your post, your problem applies to the sources as released, rather than being caused by missing patches as the OP discussed.  For regressions, please file a bug report with the developers.

----------

## wrc1944

KernelOfTruth wrote:  *Quote:*   

> the cpu optimizations should (hopefully) work with 3.15 (as long as not much changed in the Makefiles, which usually doesn't)
> 
> 

 

I recall editing kernel makefiles years ago for new AMD cpu's even before I found out about the ck and other various "performance" patches.  I always saw no reason NOT to compile my kernel with native gcc support for all the capabilities of my current cpu, even if the benefit  was sometimes  deemed questionable. It just seemed like a no-brainer, especially for Gentoo where you compile the entire distro anyway.  I was so hard-core that I even did my own kernel compiles with edited makefiles on rpm distros, such as Mandrake. I guess the central motivation was trying to squeeze every bit of performance out of the limited hardware of the day.

I gradually gave it up as it became too much trouble with all the countless kernels on multiple systems I was compiling.  Thus, my interest in the gentoo-sources experimental USE flag making this feature basically trouble-free.  Sure hope it's not going away.

BTW, FWIW I've generally found wifi to work better compiling the drivers as modules.

----------

## mpagano

 *nlsa8z6zoz7lyih3ap wrote:*   

>  *Quote:*   Are these patches really gone? 
> 
> I don't know the answer, but in at least one previous kernel they weren't in the gentoo-sources-3.x.0 when it was released initially, but appeared a few days later.
> 
> Perhaps this will be the case here too.

 

This

----------

## wrc1944

Thanks much, Mike! 

We really appreciate all the great work the devs do in maintaining and improving this wonderful Linux distro for us Gentoo users.   :Very Happy: 

----------

## mpagano

 *wrc1944 wrote:*   

> Thanks much, Mike! 
> 
> We really appreciate all the great work the devs do in maintaining and improving this wonderful Linux distro for us Gentoo users.  

 

Thank-you, your thanks is appreciated.

One of our team members has been really good with maintaining the BFQ patches for us. (TomWij). It will get there.

-Mike

----------

## nlsa8z6zoz7lyih3ap

I also would like to express my appreciation to the Gentoo developers who maintain this and other aspects of Gentoo.

They all do a great job.

I know that many users panic when the feature or patch that they most love is initially missing from some x.0 version of a package when it is first released.

My experience is that it is usually better to wait a few hours or a couple of days to give the developers a chance to work their magic before worrying that the feature may be gone for ever.   :Very Happy: 

My cat really panics when it can see through the remaining food to the bottom of its dish, 'tho, and wakes us up in the middle of the night when this happens, even if it has not yet totally run out of food.    :Smile:   Our cat can never be trained to do better than this, but  we  Gentoo users can.   :Laughing: 

----------

## wrc1944

Just synced, and saw experimental was back in 3.15.0-r1.    :Very Happy: 

Thanks again to all the devs, who day in and day out obviously go far beyond the call of duty.

----------

## nlsa8z6zoz7lyih3ap

 *Quote:*   

>  Just synced, and saw experimental was back in 3.15.0-r1.

 

Would you be kind enough to mark this as solved

----------

## wrc1944

Just started to compile 3.15.0-r1, and discovered the gcc optimiztions patch is still missing: 

```
  * linux-3.15.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                           [ ok ]

 * genpatches-3.15-2.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                               [ ok ]

 * genpatches-3.15-2.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                             [ ok ]

 * genpatches-3.15-2.experimental.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                       [ ok ]

>>> Preparing to unpack ...

>>> Unpacking source...

>>> Unpacking linux-3.15.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work

>>> Unpacking genpatches-3.15-2.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/patches

>>> Unpacking genpatches-3.15-2.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/patches

>>> Unpacking genpatches-3.15-2.experimental.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/patches

 * Applying 1700_enable-thinkpad-micled.patch (-p1) ...                                                                             [ ok ]

 * Applying 2400_kcopy-patch-for-infiniband-driver.patch (-p1) ...                                                                  [ ok ]

 * Applying 2700_ThinkPad-30-brightness-control-fix.patch (-p1) ...                                                                 [ ok ]

 * Applying 2900_dev-root-proc-mount-fix.patch (-p1) ...                                                                            [ ok ]

 * Applying 2900_s2disk-resume-image-fix.patch (-p1) ...                                                                            [ ok ]

 * Applying 4400_fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch (-p1) ...                                         [ ok ]

 * Applying 4500_support-for-pogoplug-e02.patch (-p1) ...                                                                           [ ok ]

 * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ...                                                                              [ ok ]

 * Applying 5001_BFQ-1-block-cgroups-kconfig-build-bits-for-BFQ-v7r4-3.15.patch (-p1) ...                                           [ ok ]

 * Applying 5002_BFQ-2-block-introduce-the-BFQ-v7r4-I-O-sched-for-3.15.patch1 (-p1) ...                                             [ ok ]

 * Applying 5003_BFQ-3-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r4-for-3.15.0.patch (-p1) ...                                   [ ok ]

>>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work

>>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/linux-3.15.0-gentoo-r1 ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/linux-3.15.0-gentoo-r1 ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/work/linux-3.15.0-gentoo-r1 ...

>>> Source compiled.

>>> Test phase [not enabled]: sys-kernel/gentoo-sources-3.15.0-r1

>>> Install gentoo-sources-3.15.0-r1 into /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/image/ category sys-kernel

>>> Copying sources ...

>>> Completed installing gentoo-sources-3.15.0-r1 into /var/tmp/portage/sys-kernel/gentoo-sources-3.15.0-r1/image/ 
```

Indeed, when I run make xconfig, BFQ shows up, but none of the more modern cpu options appear (including native). AMD is stuck back at the ancient k8, like it had been for years.

I'm assuming this is just an oversight, as I'm confident most users (at least gentoo users) would consider this the main cpu options kernel patch they desire.

----------

## wrc1944

I can confirm the patch for gcc optimizations found here works in 3.15.0-gentoo-r1 (that already has the BFQ and other experimental patches):

https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/outdated_versions/linux-3.15+/gcc-4.2+/enable_additional_cpu_optimizations_for_gcc_kernel_v3.15+.patch

I copy/pasted this "raw" text patch to an empty text file, named it "enable_additional_cpu_optimizations_for_gcc_kernel_v3.15+.patch" and placed it in /usr/src/linux-3.15.0-gentoo-r1.

Apparently, it applied OK even with the offsets: 

```
 gentoo-amd64 src # cd /usr/src/linux-3.15.0-gentoo-r1

gentoo-amd64 linux-3.15.0-gentoo-r1 # patch -p1 <enable_additional_cpu_optimizations_for_gcc_kernel_v3.15+.patch

patching file arch/x86/include/asm/module.h                                                                                             

patching file arch/x86/Kconfig.cpu                                                                                                      

Hunk #9 succeeded at 450 (offset -4 lines).                                                                                             

patching file arch/x86/Makefile                                                                                                         

Hunk #1 succeeded at 92 with fuzz 1 (offset 31 lines).                                                                                  

patching file arch/x86/Makefile_32.cpu                                                                                                  

gentoo-amd64 linux-3.15.0-gentoo-r1 # 
```

Then I ran make xconfig, and the gcc options showed up. I chose "native" instead of piledriver, and 3.15.0-gentoo compiled normally. The patch requirements say "linux version >=3.15" and gcc version <4.9, but I'm running gcc-4.9.0 and it apparently worked out OK. This is on a multi-lib amd64 system.

----------

## dweezil-n0xad

I currently have gentoo-sources-3.15.1, gcc-4.9.0 and I use the patch from https://github.com/graysky2/kernel_gcc_patch

```
# wget -P /etc/portage/patches/sys-kernel/gentoo-sources https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v4.9+_kernel_v3.15+.patch

# emerge gentoo-sources
```

kernel config: 

```

Processor type and features  --->

   Processor family (Native optimizations autodetected by GCC)
```

----------

## mackal

The GCC patches probably weren't included because the main one requires GCC 4.9, but the there is one int he outdated_versions folder that works for older GCCs, that should also work for 4.9 (I don't think the changes to the march settings were removed, just deprecated or something)

----------

## mpagano

Added for next release of 3.15. Thanks for everyone's patience.

Mike Pagano [Mon, 23 Jun 2014 12:53:12 -0400 (12:53 -0400)] 

Adding cpu optimization patch

----------

## nlsa8z6zoz7lyih3ap

 *Quote:*   

> Added for next release of 3.15. Thanks for everyone's patience.
> 
> 

 

Thanks for doing this. I am quite fond of this patch.

----------

## mpagano

released in gentoo-sources-3.15.2 in genpatches-3.15-4

----------

## wrc1944

Mike (and any other devs on the gentoo-sources),

Thanks very, very Much!   :Very Happy: 

----------

