# Enabling Cores

## slackline

Hi,

I've an Asus Zenbook UX21e that is up and for the most part running Gentoo very nicely (a few niggles to sort, but nothing a bit of time won't sort).

One thing I've noticed though is that the output of lshw shows the following...

```

id:   cpu

description:    CPU

product:    Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz

vendor:    Intel Corp.

physical id:    4

bus info:    cpu@0

version:    Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz

serial:    To Be Filled By O.E.M.

slot:    CPU 1

size:    1601MHz

capacity:    4GHz

width:    64 bits

clock:    100MHz

capabilities:    x86-64 fpu fpu_exception wp 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 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid cpufreq 

configuration:       cores   =   2

 enabledcores   =   1

 threads   =   2

```

I'm unsure why there are two cores reported for the processor, but only one is enabled?

How do I go about enabling both cores?

Under kernel configuration I've...

```

Processor type and features -->

  Processor family (Core 2/newer Zeon) -->

    (X) Core 2/newer Zeon

```

I note here suggests the "MAKEOPTS=-j5", which I've now set, but that makes no difference to the output of lshw.

Could it be attributable to some aspect of power saving (need to check what I've enabled for things like CPU scaling in the kernel).

slack

----------

## massimo

What is the output of lscpu? Did you set SMT (Hyperthreading) scheduler support and Multi-core scheduler support in your kernel config?

----------

## slackline

[quote="massimo"]What is the output of lscpu?

Various outputs...

```

# lscpu 

Architecture:          x86_64

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                2

On-line CPU(s) list:   0,1

Thread(s) per core:    1

Core(s) per socket:    2

Socket(s):             1

NUMA node(s):          1

Vendor ID:             GenuineIntel

CPU family:            6

Model:                 23

Stepping:              10

CPU MHz:               2999.456

BogoMIPS:              5998.91

Virtualization:        VT-x

L1d cache:             32K

L1i cache:             32K

L2 cache:              6144K

NUMA node0 CPU(s):     0,1

#

# lscpu -a -e

CPU NODE SOCKET CORE L1d:L1i:L2 ONLINE

0   0    0      0    0:0:0      yes

1   0    0      1    1:1:0      yes

#

# lscpu -a -p

# The following is the parsable format, which can be fed to other

# programs. Each different item in every column has an unique ID

# starting from zero.

# CPU,Core,Socket,Node,,L1d,L1i,L2

0,0,0,0,,0,0,0

1,1,0,0,,1,1,0

```

 *massimo wrote:*   

> Did you set SMT (Hyperthreading) scheduler support and Multi-core scheduler support in your kernel config?

 

Yep got both of those enabled, basically I've used the kernel posted here (by someone else who thankfully did a lot of the hardwork on sussing out kernel options for this laptop).

Am I perhaps mis-interpreting the output from lshw and both cores are enabled?

----------

## krinn

why using such program with unclear output ? You wish see how many cores are enable, ask the kernel !

```
cat /proc/cpuinfo | grep processor

processor   : 0

processor   : 1

processor   : 2

processor   : 3

processor   : 4

processor   : 5

processor   : 6

processor   : 7

```

----------

## BillWho

slack---line, 

I have a laptop Intel(R) Core(TM) i3-2350M and it shows enabledcores=1   :Confused: 

This is the first time I've looked at the output of lshw - it must be a shortcoming of the application. I use conky and it shows four processors along with /proc/cpuinfo.

```
laptop bill # grep  processor /proc/cpuinfo 

processor   : 0

processor   : 1

processor   : 2

processor   : 3

```

----------

## slackline

 *krinn wrote:*   

> why using such program with unclear output ? 

 

Because I was intending on writing up a HowTo on installing Gentoo on this particular laptop and figured a description of all of the hardware would be useful as a starting point and lshw provides that in nice html output that embeds in a wiki easily (from what I've read these ship with two variants on the wireless front so I wanted to make it crystal clear which I had for potential readers).

Checking as you've suggested...

```

# grep /proc/cpuinfo processor

processor   : 0

processor   : 1

```

So that looks more promising, although why would a lower rated processor (BillWho's i3-2350M compared to my  i5-2467M) have four processors showing when all the entries here show laptop i5's as having two cores?????

Also, whilst /proc/cpuinfo tells you whats there, is it telling you what is actually enabled as the output of lshw is purportedly doing?  Two processors, each with two cores each according to the full output from /proc/cpuinfo but are these enabled (i.e. four cores total)?  lshw suggests not, any other way of checking?

```

# cat /proc/cpuinfo

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 CPU         E8400  @ 3.00GHz

stepping   : 10

cpu MHz      : 2999.456

cache size   : 6144 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni monitor tm2 ssse3 lahf_lm dtherm

bogomips   : 5998.91

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 CPU         E8400  @ 3.00GHz

stepping   : 10

cpu MHz      : 2999.456

cache size   : 6144 KB

physical id   : 0

siblings   : 2

core id      : 1

cpu cores   : 2

apicid      : 1

initial apicid   : 1

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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority

bogomips   : 5998.91

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

```

EDIT : It appears /proc/cpuinfo and lshw are reporting different processors. From lshw...

```

Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz
```

...from /proc/cpuinfo...

```

Intel(R) Core(TM)2 CPU         E8400  @ 3.00GHz

```

 :Question: 

----------

## wrc1944

Make sure these options are also enabled in your kernel config.

CONFIG_SMP=y

CONFIG_SCHED_MC=y

CONFIG_NR_CPUS     (enter your preferred number)

----------

## krinn

Because your flags "ht" mean hyperthreading, intel tech, double the cores of your cpu.

So, again asking kernel

you should see the ht flags in your, well, flags

you should see number of processors like i have gave already

and your real number of cores with "cpu cores"

So you should get

 *Quote:*   

> flagsprocessor	: 6
> 
> vendor_id	: GenuineIntel
> 
> cpu family	: 6
> ...

 

and the kernel setting : CONFIG_X86_HT

----------

