Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559382 - linux-4.{2,3}: multicore scheduling not working when NO_HZ_FULL is set
Summary: linux-4.{2,3}: multicore scheduling not working when NO_HZ_FULL is set
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard:
Keywords:
: 559556 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-02 07:16 UTC by Martin Wohlert
Modified: 2017-03-02 00:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Wohlert 2015-09-02 07:16:01 UTC
After booting the gentoo-sources-4.2.0 kernel I can see all my CPU cores in lscpu, htop etc. but all applications and threads are running on the first core only. All other cores are idle.

Issue is affecting all my tested machines (one AMD, one Intel and one ARM).
This does not happen with vanilla-sources-4.2.0.

I'm not sure what's causing this.

Reproducible: Always

Steps to Reproduce:
1. emerge gentoo-sources-4.2.0, configure and build kernel
2. boot kernel
3. watch in htop while running "7z b" (p7zip), ffmpeg encode with libx264 (multithread) or other applications normally using multiple cores.
Actual Results:  
first core is doing all the work, system performance goes down. All other cores are idle.

Expected Results:  
Applications and threads are shared over all cores.
Comment 1 Ognian Tenchev 2015-09-02 15:04:17 UTC
Same here. 
1. emerge gentoo-sources-4.2.0
2. get config from 4.1.6 (zcat /proc/config.gz >.config)
3. book new kernel - only one core working from four (in top there are four cores)

For me vanilla-sources-4.2.0 also not working. Again one core from four.
Comment 2 josef.95 2015-09-02 18:25:54 UTC
Try
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
Comment 3 Martin Wohlert 2015-09-03 05:35:17 UTC
fyi: https://bugzilla.kernel.org/show_bug.cgi?id=101021
Comment 4 Martin Wohlert 2015-09-03 07:43:50 UTC
@josef.95 Thanks for your hint! My machines are fully functional again now.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-03 22:45:43 UTC
Not fixed, judging by bug #559382.
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-03 22:48:17 UTC
*** Bug 559556 has been marked as a duplicate of this bug. ***
Comment 7 Alexey Shvetsov archtester gentoo-dev 2015-09-10 17:12:48 UTC
I get same issue.
Comment 8 Alexey Shvetsov archtester gentoo-dev 2015-09-26 21:44:49 UTC
4.2.1 has same issue
Comment 9 Mike Pagano gentoo-dev 2015-10-01 23:20:50 UTC
(In reply to Alexey Shvetsov from comment #8)
> 4.2.1 has same issue

Did you try this?

CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
Comment 10 Artemii 2015-10-02 05:23:41 UTC
4.2.2 has same problem.

P.S. for Mike Pagano "when NO_HZ_FULL is set"
Comment 11 Mike Pagano gentoo-dev 2015-10-02 10:07:27 UTC
(In reply to Artemii from comment #10)
> 4.2.2 has same problem.
> 
> P.S. for Mike Pagano "when NO_HZ_FULL is set"

Can you do me a favor please and try the above with git-sources ?

The latest version if you don't mind.
Comment 12 Artemii 2015-10-03 07:25:38 UTC
(In reply to Mike Pagano from comment #11)
> Can you do me a favor please and try the above with git-sources ?
> 
> The latest version if you don't mind.

4.3-rc3 still has same problem.
Comment 13 Mike Pagano gentoo-dev 2015-10-06 13:52:11 UTC
(In reply to Artemii from comment #12)
> (In reply to Mike Pagano from comment #11)
> > Can you do me a favor please and try the above with git-sources ?
> > 
> > The latest version if you don't mind.
> 
> 4.3-rc3 still has same problem.

What do you have for NO_HZ_FULL ?
Comment 14 Artemii 2015-10-06 16:01:21 UTC
(In reply to Mike Pagano from comment #13)
> (In reply to Artemii from comment #12)
> >
> > 4.3-rc3 still has same problem.
> 
> What do you have for NO_HZ_FULL ?

CONFIG_NO_HZ_FULL=y
CONFIG_NO_HZ_FULL_ALL=y
# CONFIG_NO_HZ_FULL_SYSIDLE is not set

cpuinfo tell about eight cores AMD FX(tm)-8120
Comment 15 Mike Pagano gentoo-dev 2015-10-06 19:49:02 UTC
(In reply to Artemii from comment #14)
> (In reply to Mike Pagano from comment #13)
> > (In reply to Artemii from comment #12)
> > >
> > > 4.3-rc3 still has same problem.
> > 
> > What do you have for NO_HZ_FULL ?
> 
> CONFIG_NO_HZ_FULL=y
> CONFIG_NO_HZ_FULL_ALL=y
> # CONFIG_NO_HZ_FULL_SYSIDLE is not set
> 
> cpuinfo tell about eight cores AMD FX(tm)-8120


try this

CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
Comment 16 Artemii 2015-10-07 21:51:58 UTC
(In reply to Mike Pagano from comment #15)
> try this
> 
> CONFIG_NO_HZ_COMMON=y
> CONFIG_NO_HZ_IDLE=y
> # CONFIG_NO_HZ_FULL is not set
> CONFIG_NO_HZ=y

In this case multicore scheduling works fine.
Comment 17 Erich Seifert 2015-10-09 11:51:14 UTC
still seeing this with 4.2.3
Comment 18 Alexey Shvetsov archtester gentoo-dev 2015-10-21 04:47:44 UTC
kernel 4.3-rc6 also affected. Tested on x86 and armv7l
Comment 19 Alexey Shvetsov archtester gentoo-dev 2015-11-05 09:59:12 UTC
Another fun error. If SERVER PREEMPTION set also all tasks will go to core0
Comment 20 Leho Kraav (:macmaN @lkraav) 2015-12-05 22:54:56 UTC
This is probably the relevant LKML thread response https://lkml.org/lkml/2015/7/15/762