From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752372AbbJJTM5 (ORCPT ); Sat, 10 Oct 2015 15:12:57 -0400 Received: from smtp1.it.da.ut.ee ([193.40.5.66]:41430 "EHLO smtp1.it.da.ut.ee" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbbJJTM4 (ORCPT ); Sat, 10 Oct 2015 15:12:56 -0400 Date: Sat, 10 Oct 2015 22:14:25 +0300 (EEST) From: Meelis Roos To: Linux Kernel list cc: Thomas Gleixner , "Paul E. McKenney" , Frederic Weisbecker Subject: 4.2: CONFIG_NO_HZ_FULL_ALL effectively disabling non-boot CPUs Message-ID: User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Short summary: turning on CONFIG_NO_HZ_FULL_ALL seems to disable all non-boot CPUs for scheduler. A couple of days ago I noticed that make -j8 on a 4-core i5 is very slow (with 4.3.0-rc4+git). Looking at top ('1' for per-cpu states), only first CPU is loaded and 3 other CPUs are 100% idle. This seems to be a problem on 3 of my desktop machines (different generation Intel: i5-660, i5-2400, i3-3220). All the computers run custom kernels. Further investigation showed that CPU affinity was set to 1 (CPU0 only) for init and all the children. Kernel threads had affinities 1,2,4,8 and f (seems normal). Even more interesting was the behaviour after setting affinity to f for all userland processes and then running make -j4. The other cores were still idle! Switching back to 4.2.0 with my config, the problem persisted. 4.2.3 as packaged by Debian worked fine. 4.0.0 and 4.1.0 with my config worked also fine. systemd and sysvinit behaved the same and no affinity was configured for systemd. So did a kernel config bisection between my kernel config and Debian config and came to CONFIG_NO_HZ_FULL_ALL. Debian has it off, I had it on. Turning that off fixed the scheduling and the system spread the tasks to all the cores. I do not remember changing this value for a long time, I set them after the settings were introduced and used it. So it seems it broken in 4.2.0 but was working in 4.1 but I do not have 4.1 config saved anywhere (many make oldconfigs since). Bisection between 4.1 and 4.2 is possible but not easy since the machines are usually actively used when I am near them. -- Meelis Roos (mroos@linux.ee)