Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hyperthreading enabled with idle cores [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Sun Nov 01, 2015 12:44 pm    Post subject: Hyperthreading enabled with idle cores [SOLVED] Reply with quote

Hello everyone,

I've got a little issue I can't crack and it's beginning to annoy me. For as long as I can remember top has shown me idle hyperthreaded CPU (Output on high load with several compilations) :
Code:
top - 13:28:25 up 1 day, 53 min,  1 user,  load average: 11,06, 6,14, 2,89
Tasks: 344 total,  11 running, 333 sleeping,   0 stopped,   0 zombie
%Cpu0  :   0,0/0,0     0[                                                                         ]
%Cpu1  :  88,7/11,3  100[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
%Cpu2  :  88,7/11,3  100[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
%Cpu3  :  93,3/6,7   100[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
%Cpu4  :  90,7/9,3   100[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||]
%Cpu5  :   0,0/0,0     0[                                                                         ]
%Cpu6  :   0,0/0,0     0[                                                                         ]
%Cpu7  :   0,0/0,0     0[                                                                         ]
GiB Mem : 18,5/15,700   [                                                                         ]
GiB Swap:  0,0/2,000    [                                                                         ]


NB : gnome-system-monitor reports the exact same usage of 4 idle CPUs and 4 active CPUs.

I didn't ever payed special attention to this issue until I booted recently on the gentoo LiveDVD (well on USB) in order to make adjustments on my RAID-root. Out of curiosity I checked the CPU usage during LiveDVD session and noticed all 8 CPUs were accounted in there and they were all used. I'm guessing since it's hyperthreaded that they couldn't go further than all @50% but I dedicated myself to finding why there was a different behavior in cpu usage accounting.

NB : Same goes with a Ubuntu LiveUSB for instance, it can report usage on all 8 CPUs

I then decided to compile my kernel with the exact same configruation as the LiveDVD one (copied .config and genkernel, in order to be precise, I genkernel with udev, mdadm, lvm to build an initramfs with these binaries), same result after bootup.

That got me puzzled, I'd really like to understand why there is this difference in behavior. I still see 8 tuxes on bootup and output of dmidecode shows this :
Code:
#dmidecode -t processor
# dmidecode 2.12
SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
   Socket Designation: LGA1155
   Type: Central Processor
   Family: Core 2 Duo
   Manufacturer: Intel           
   ID: A7 06 02 00 FF FB EB BF
   Signature: Type 0, Family 6, Model 42, Stepping 7
   Flags:
      FPU (Floating-point unit on-chip)
      VME (Virtual mode extension)
      DE (Debugging extension)
      PSE (Page size extension)
      TSC (Time stamp counter)
      MSR (Model specific registers)
      PAE (Physical address extension)
      MCE (Machine check exception)
      CX8 (CMPXCHG8 instruction supported)
      APIC (On-chip APIC hardware supported)
      SEP (Fast system call)
      MTRR (Memory type range registers)
      PGE (Page global enable)
      MCA (Machine check architecture)
      CMOV (Conditional move instruction supported)
      PAT (Page attribute table)
      PSE-36 (36-bit page size extension)
      CLFSH (CLFLUSH instruction supported)
      DS (Debug store)
      ACPI (ACPI supported)
      MMX (MMX technology supported)
      FXSR (FXSAVE and FXSTOR instructions supported)
      SSE (Streaming SIMD extensions)
      SSE2 (Streaming SIMD extensions 2)
      SS (Self-snoop)
      HTT (Multi-threading)
      TM (Thermal monitor supported)
      PBE (Pending break enabled)
   Version: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz       
   Voltage: 1.0 V
   External Clock: 100 MHz
   Max Speed: 3800 MHz
   Current Speed: 3400 MHz
   Status: Populated, Enabled
   Upgrade: Other
   L1 Cache Handle: 0x0005
   L2 Cache Handle: 0x0006
   L3 Cache Handle: 0x0007
   Serial Number: To Be Filled By O.E.M.
   Asset Tag: To Be Filled By O.E.M.
   Part Number: To Be Filled By O.E.M.
   Core Count: 4
   Core Enabled: 1
   Thread Count: 2
   Characteristics:
      64-bit capable


SMP enabled :
Code:
#uname -a
Linux kentauros 4.2.5-gentoo #1 SMP PREEMPT Fri Oct 30 15:39:27 CET 2015 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux


Differences I can tell but can't explain why it would do anything :
  • LiveUSB is booted by EFI, main system is using grub-pc
  • LiveUSB is using aufs-sources, main system is using gentoo-sources
  • Different versions in a whole lot of packages obviously


I'd gladly take some help at this point for I'm a bit loss in all the search for understanding. Of course it's more a question about understanding my computer, it all still works like a charm, but maybe I could get it to work faster if I understood correctly how this works.

Thanks a lot for any help :)
_________________
Arkhelion


Last edited by Arkhelion on Tue Nov 03, 2015 8:06 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sun Nov 01, 2015 5:17 pm    Post subject: Reply with quote

Try the same kernel version as the LiveUSB/LiveDVD ...
Perhaps there's a bug in 4.2.5. I haven't tried it yet, I'm still on 3.18.11-gentoo and all threads are being used just fine...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Sun Nov 01, 2015 5:42 pm    Post subject: Reply with quote

Actually I don't think it's the kernel version, but the kernel config where the problem lies. That's a common cpu(btw im using that with smp and hyperthreading on the 4.2.5 kernel, different cpu though), lots of people would be complaining and filling bug reports.

can you pastebin your kernel config?

edit: also dmesg from the failing setup could be useful.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sun Nov 01, 2015 6:35 pm    Post subject: Reply with quote

http://ark.intel.com/products/52213/Intel-Core-i7-2600-Processor-8M-Cache-up-to-3_80-GHz


what says number of cpus in your kernel?

which cpu is set?

I do not get hte point why using preconfigured kernels anyway. They are good as a starting point, but for anyhting else, nope.

When you need to get a box running at the installation step, genkernel may work, but after some weeks you should have made / changed the config so it suits your tastes better.


You may configre the top 5 categories of make menuconfig again, from scratch ! And search for the options when you do not undertstand those.

4.2.5 here and htop / i7z report no issues ... 3610qm, i7
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Sun Nov 01, 2015 7:11 pm    Post subject: Re: Hyperthreading enabled with idle cores Reply with quote

The OP had compiled the kernel "with the exact same configuration"
Arkhelion wrote:
I then decided to compile my kernel with the exact same configruation as the LiveDVD one (copied .config and genkernel, in order to be precise, I genkernel with udev, mdadm, lvm to build an initramfs with these binaries), same result after bootup.

and it still didn't work.. and the fact that my CPU (i7-2700K) is probably the closest to the i7-2600k, would imply a kernel regression or the above statement about the configuration is not true.

[EDIT]

I tried it with my i7-2700K and do not see the same behavior as described - I copied my 3.18.11-gentoo config kernel and make menuconfig with no changes, then rebuilt. All 8 threads are being used when building a kernel on my machine on 4.2.5 vanilla.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Sun Nov 01, 2015 8:01 pm    Post subject: Reply with quote

First of all, thanks for all your answers :)

I'm also glad that I actually pointed something wrong with my system, that way I'll probably be able to learn something.

So about the pastebins :
.config
dmesg

Kernel says 8 CPU (/proc/cpuinfo number 0 to 7) :
Code:
processor   : 7
vendor_id   : GenuineIntel
cpu family   : 6
model      : 42
model name   : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping   : 7
microcode   : 0x28
cpu MHz      : 2925.062
cache size   : 8192 KB
physical id   : 0
siblings   : 8
core id      : 3
cpu cores   : 4
apicid      : 7
initial apicid   : 7
fpu      : yes
fpu_exception   : yes
cpuid level   : 13
wp      : yes
flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt
bugs      :
bogomips   : 6822.38
clflush size   : 64
cache_alignment   : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:


About the kernel config it's no way near a preconfigured kernel. I use genkernel but with kernel-config option you can pass a custom configuration file (which I do) so genkernel is only used to quickly make the kernel, the initramfs and put them in place, that's all it does, I've ran all of the kernel options several times and I might have been to quick in enabling/disabling some of them but as I can see that a vastly generic kernel configuration like the LiveDVD one gave me the same behavior I actually began to doubt it had anything to do with the kernel... But maybe there's still something wrong with it (and I bet there is something wrong, and not only about this issue :P )

EDIT for eccerr0r : You talk about 4.2.5 vanilla but I'm on 4.2.5 gentoo-sources to be precise
_________________
Arkhelion
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Sun Nov 01, 2015 9:44 pm    Post subject: Reply with quote

Code:
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:8 nr_node_ids:1
[    0.000000] PERCPU: Embedded 32 pages/cpu @ffff88041ec00000 s90648 r8192 d32232 u262144
[    0.000000] pcpu-alloc: s90648 r8192 d32232 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[...]
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8
[...]
[    0.000012] ACPI: Core revision 20150619
[    0.004624] ACPI: All ACPI Tables successfully acquired
[    0.005401] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[    0.009171] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.010908] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.010925] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.011168] Initializing cgroup subsys blkio
[    0.011172] Initializing cgroup subsys memory
[    0.011180] Initializing cgroup subsys devices
[    0.011183] Initializing cgroup subsys freezer
[    0.011186] Initializing cgroup subsys net_cls
[    0.011204] CPU: Physical Processor ID: 0
[    0.011207] CPU: Processor Core ID: 0
[    0.011211] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.011213] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.011217] mce: CPU supports 9 MCE banks
[    0.011227] CPU0: Thermal monitoring enabled (TM1)
[    0.011236] process: using mwait in idle threads
[    0.011240] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8
[    0.011242] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0
[    0.011577] Freeing SMP alternatives memory: 44K (ffffffff82292000 - ffffffff8229d000)
[    0.118892] DMAR: Host address width 36
[    0.118895] DMAR: DRHD base: 0x000000fed90000 flags: 0x1
[    0.118904] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c9008020660262 ecap f0105a
[    0.118907] DMAR: RMRR base: 0x000000df0cf000 end: 0x000000df0ddfff
[    0.118912] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed90000 IOMMU 0
[    0.118914] DMAR-IR: HPET id 0 under DRHD base 0xfed90000
[    0.118917] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.119173] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    0.119175] x2apic enabled
[    0.119181] Switched APIC routing to cluster x2apic.
[    0.119608] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.129610] TSC deadline timer enabled
[    0.129613] smpboot: CPU0: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (fam: 06, model: 2a, stepping: 07)
[    0.129633] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, full-width counters, Intel PMU driver.
[    0.129653] ... version:                3
[    0.129655] ... bit width:              48
[    0.129657] ... generic registers:      4
[    0.129660] ... value mask:             0000ffffffffffff
[    0.129662] ... max period:             0000ffffffffffff
[    0.129664] ... fixed-purpose events:   3
[    0.129666] ... event mask:             000000070000000f
[    0.132683] x86: Booting SMP configuration:
[    0.132689] .... node  #0, CPUs:      #1 #2 #3 #4 #5 #6 #7
[    0.161876] x86: Booted up 1 node, 8 CPUs
[    0.161882] smpboot: Total of 8 processors activated (54579.07 BogoMIPS)


so doesn't this mean the 8 nodes where started correctly?(edit: actually I'm confused now and I couldnt find anything wrong on the config, but that doesnt mean much)

I actually don't know if it has anything to do with it, so I'm just guessing, but do you have the "smp" flag set in your make.conf?
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Sun Nov 01, 2015 11:09 pm    Post subject: Reply with quote

No I haven't got the SMP flag in make.conf but the only package which could use it seems to be gimp unless I'm missing something :
Code:
equery h smp
 * Searching for USE flag smp ...
[IP-] [  ] media-gfx/gimp-2.8.14-r1:2


Although I have the threads flag on.
_________________
Arkhelion
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Nov 02, 2015 12:09 am    Post subject: Reply with quote

Ok. I've found something in your config.

try setting this option on:
Code:

# CONFIG_MAXSMP is not set


this is what make menuconfig says about it:
Code:

  ┌─────────────────────────── Enable Maximum number of SMP Processors and NUMA Nodes ────────────────────────────┐
  │ CONFIG_MAXSMP:                                                                                                │ 
  │                                                                                                               │ 
  │ Enable maximum number of CPUS and NUMA Nodes for this architecture.                                           │ 
  │ If unsure, say N.                                                                                             │ 
  │                                                                                                               │ 
  │ Symbol: MAXSMP [=y]                                                                                           │ 
  │ Type  : boolean                                                                                               │ 
  │ Prompt: Enable Maximum number of SMP Processors and NUMA Nodes                                                │ 
  │   Location:                                                                                                   │ 
  │     -> Processor type and features                                                                            │ 
  │   Defined at arch/x86/Kconfig:846                                                                             │ 
  │   Depends on: X86_64 [=y] && SMP [=y] && DEBUG_KERNEL [=y]                                                    │ 
  │   Selects: CPUMASK_OFFSTACK [=y]                                                                              │ 
  │                                             
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Nov 02, 2015 1:11 am    Post subject: Reply with quote

It doesn't make sense that it detects more than 4 cores, uses 4 threads and no more.

These are my SMP options, I hardcoded to 8 CPUs because there's no way this machine is getting more than 8 unfortunately due to sockets available: Also make sure this is "8" and not "4":

Code:
CONFIG_SMP=y
# CONFIG_MAXSMP is not set
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y


- Are you sure that load average is due to processes on the run queue and not due to disk wait? When you do 'top' do you actually see 11 process in the " R " state to contribute to the 11 load average?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Nov 02, 2015 2:08 am    Post subject: Reply with quote

oh, I missed that. OP`s config has
Code:

CONFIG_NR_CPUS=64
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 6:36 am    Post subject: Reply with quote

genoobish wrote:
oh, I missed that. OP`s config has
Code:

CONFIG_NR_CPUS=64


Hi again,

Yeah this was 8 before, it's moved to 64 when I tried to change the config for the issue we're talking about here.
_________________
Arkhelion
Back to top
View user's profile Send private message
TigerJr
Guru
Guru


Joined: 19 Jun 2007
Posts: 540

PostPosted: Mon Nov 02, 2015 7:11 am    Post subject: Reply with quote

NUMA Nodes used only on AMD systems it means nothing with Intel CPU! Cause NUMA it's method used to share memory from one processor to another via hypertransport bus, by the way intel does not support hypertransport so that option does nothing (not bad and not good). In a fact you have only one NODE with 8 CPU units according NUMA topology.

So intel support SMP topology those manage memory access. You can try to use NUMA Emulation, but i think you can have only one NUMA node and i don't know what Emulation can give you... (numactl -H - to look for nodes)
_________________
Do not use gentoo, it die
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 8:44 am    Post subject: Reply with quote

Hi again,

eccerr0r wrote:
- Are you sure that load average is due to processes on the run queue and not due to disk wait? When you do 'top' do you actually see 11 process in the " R " state to contribute to the 11 load average?


I might get this wrong but if I launch 8 times "cat /dev/urandom > /dev/null" I still get only 4 CPUs @100% though I believe there are absolutely no IO in this particular use case.

TigerJr wrote:
NUMA Nodes used only on AMD systems it means nothing with Intel CPU! Cause NUMA it's method used to share memory from one processor to another via hypertransport bus, by the way intel does not support hypertransport so that option does nothing (not bad and not good). In a fact you have only one NODE with 8 CPU units according NUMA topology.

So intel support SMP topology those manage memory access. You can try to use NUMA Emulation, but i think you can have only one NUMA node and i don't know what Emulation can give you... (numactl -H - to look for nodes)


I'll try to deactivate NUMA in kernel when I get home, but as you pointed out I only have one node, so I'm not sure it'll change anyhting. Moreover it seems to me that I activated NUMA when tinkering with this kernel after noticing the problem. But I'll confirm you that this evening (CET).
_________________
Arkhelion
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Mon Nov 02, 2015 1:31 pm    Post subject: Reply with quote

Code:
[  100.334531] vboxdrv: Found 8 processor cores
[  100.349989] vboxdrv: TSC mode is Invariant, tentative frequency 3411128561 Hz
[  100.365879] supdrvMeasureTscDeltaOne failed. rc=-3743 CPU[0].idCpu=3 Master[2].idCpu=0
[  100.382080] supdrvMeasureTscDeltaOne failed. rc=-3743 CPU[0].idCpu=3 Master[2].idCpu=0
[  100.398166] vboxdrv: Successfully loaded version 5.0.6 (interface 0x00240000)
[  100.398748] VBoxPciLinuxInit
[  100.415351] vboxpci: pci-stub module not available, cannot detach PCI devices
[  100.432310] vboxpci: IOMMU found
[  100.449316] VBoxNetFlt: Successfully started.
[  100.466316] VBoxNetAdp: Successfully started.

is this setup a vbox guest? (I actually don't know what that vbox log is about...)
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 1:44 pm    Post subject: Reply with quote

No this is a VBox host (these are the modules to run VirtualBox as a host)
_________________
Arkhelion
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Nov 02, 2015 4:44 pm    Post subject: Reply with quote

Interesting... did not see that vbox drivers were loaded. Is this the same way on the other test kernels that work?

I've never tried "locking" a VM to specific core, perhaps that's doing something.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 5:24 pm    Post subject: Reply with quote

Hi I actually didn't get any kernel to work on my system. I had kernels working on LiveUSB only so I can't tell about the VBox driver, but I can blacklist them if you think this could help troubleshoot the issue.

As for NUMA, I'm currently compiling, but I noticed that in kernel menuconfig help for NUMA, that would explain why I tried activating it :
Code:
For 64-bit this is recommended if the system is Intel Core i7 (or later), AMD Opteron, or EM64T NUMA.


I'm gonna boot with NUMA disabled, then with VBox drivers blacklisted and keep you posted.
_________________
Arkhelion
Back to top
View user's profile Send private message
TigerJr
Guru
Guru


Joined: 19 Jun 2007
Posts: 540

PostPosted: Mon Nov 02, 2015 5:58 pm    Post subject: Reply with quote

You need to know more about EM64T:

https://en.wikipedia.org/w/index.php?title=EM64T&redirect=no

And
NUMA - Non Uniform Memory Access need hypertransport those doesn't supported in SMP systems:

https://en.wikipedia.org/wiki/Non-uniform_memory_access

So i don't know why Core I7 is here - NUMA emulation is not gives you numa functionality
_________________
Do not use gentoo, it die
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 10:04 pm    Post subject: Reply with quote

I disabled NUMA and removed VBox drivers from modules-load.d and I still have CPU 5 to 7 idling all the time (CPU0 does some iowait now and then, but I don't know if it's relevant as it never goes beyond 2-3%)

I also tried another compilation with LiveDVD config file and VBox drivers off and still nothing more.
_________________
Arkhelion
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Mon Nov 02, 2015 11:21 pm    Post subject: Reply with quote

Hi again,

I'll add some new information I just uncovered. If i take any process on my system I found this output in /proc/<pid>/status :
Code:
$ cat /proc/2889/status
Name:   gnome-shell
State:   S (sleeping)
Tgid:   2889
Ngid:   0
Pid:   2889
PPid:   2793
TracerPid:   0
Uid:   1000   1000   1000   1000
Gid:   1000   1000   1000   1000
FDSize:   64
Groups:   6 7 10 18 19 27 35 85 100 106 250 983 985 989 991 996 998 1000
NStgid:   2889
NSpid:   2889
NSpgid:   2650
NSsid:   2650
VmPeak:    1957244 kB
VmSize:    1955196 kB
VmLck:          0 kB
VmPin:          0 kB
VmHWM:     236876 kB
VmRSS:     230664 kB
VmData:    1314604 kB
VmStk:        144 kB
VmExe:         12 kB
VmLib:     109560 kB
VmPTE:       1412 kB
VmPMD:         24 kB
VmSwap:          0 kB
Threads:   8
SigQ:   0/64076
SigPnd:   0000000000000000
ShdPnd:   0000000000000000
SigBlk:   0000000000000000
SigIgn:   0000000001001000
SigCgt:   0000000180014000
CapInh:   0000000000000000
CapPrm:   0000000000000000
CapEff:   0000000000000000
CapBnd:   0000003fffffffff
Seccomp:   0
Cpus_allowed:   1e
Cpus_allowed_list:   1-4
Mems_allowed:   1
Mems_allowed_list:   0
voluntary_ctxt_switches:   83863
nonvoluntary_ctxt_switches:   22911


Code:
cat /proc/22749/status
Name:   chrome
State:   S (sleeping)
Tgid:   22749
Ngid:   0
Pid:   22749
PPid:   11963
TracerPid:   0
Uid:   1000   1000   1000   1000
Gid:   1000   1000   1000   1000
FDSize:   256
Groups:   6 7 10 18 19 27 35 85 100 106 250 983 985 989 991 996 998 1000
NStgid:   22749   319   1
NSpid:   22749   319   1
NSpgid:   2650   0   0
NSsid:   2650   0   0
VmPeak:     946608 kB
VmSize:     932784 kB
VmLck:          0 kB
VmPin:          0 kB
VmHWM:     144904 kB
VmRSS:     114296 kB
VmData:     469884 kB
VmStk:        148 kB
VmExe:     113284 kB
VmLib:      99252 kB
VmPTE:        992 kB
VmPMD:        160 kB
VmSwap:          0 kB
Threads:   11
SigQ:   0/64076
SigPnd:   0000000000000000
ShdPnd:   0000000000000000
SigBlk:   0000000000000000
SigIgn:   0000000000001002
SigCgt:   00000001c0014eed
CapInh:   0000000000000000
CapPrm:   0000000000000000
CapEff:   0000000000000000
CapBnd:   0000003fffffffff
Seccomp:   2
Cpus_allowed:   1e
Cpus_allowed_list:   1-4
Mems_allowed:   1
Mems_allowed_list:   0
voluntary_ctxt_switches:   14037
nonvoluntary_ctxt_switches:   176


Notice that those two process both have at least 8 threads running but the interesting part is on the last lines of the output, Cpus_allowed_list shows only 1-4.

I can check many PIDs and even self with the same 1E Cpus_allowed mask, where I'm expected to see FF or at least FE (if cpu0 is somewhat reserved but I don't think so), could someone with a similar processor cat /proc/self/status to check on the Cpus_allowed property (FF or FE) ?

Those are precisely the 4 CPUs working on my computer, so I believe this is another clue of the wrong behavior I'm experiencing.
_________________
Arkhelion
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Tue Nov 03, 2015 1:01 am    Post subject: Reply with quote

Do you have a rogue taskset(1) run somewhere in your startup scripts? What if you stop your scripts from initializing your virtualbox stuff?

Have you verified using the kernel of the livedvd or ubuntu on your normal Gentoo install?
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Tue Nov 03, 2015 6:46 am    Post subject: Reply with quote

Hi,

As for any taskset in my startup scripts, I'm not sure where to look for that, especially on init.

I did boot blocking every VBox driver and still no change. For your second phrase you mean straight copy of the kernel, without compiling ? I'm not sure I could as these kernels all have nouveau in them and nvidia-drivers are installed on my system, but I did boot with a kernel compile with raw .config from the LiveDVD.
_________________
Arkhelion
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Tue Nov 03, 2015 7:29 am    Post subject: Reply with quote

Hi again,

Got it !

I had a line in /etc/systemd/system.conf setting :
Code:
CPUAffinity=1 2 3 4


Once changed to :
Code:
CPUAffinity=0 1 2 3 4 5 6 7


I must confess I'm feeling a bit dumb as I have no idea where this came from (probably me, but what was I thinking that day, I can't even remember when I went through this file?). That explains why kernel configuration didn't have any effect, that wasn't in the kernel but in the systemd configuration.

I'm not sure I'll get much of a boost performance-wise but the temperature sure goes up a lot slower, happy me :)

Thanks a lot for all your support and advice.
_________________
Arkhelion
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Tue Nov 03, 2015 11:34 am    Post subject: Reply with quote

you don't have to feel dumb for not knowing about some obscure systemd oogy-boogy setup.
It's probably something new they introduced in the last stable version. :twisted: /rant
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum