LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-07-2017, 10:17 PM   #1
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Rep: Reputation: Disabled
4.8.16 only reports a single core in /proc/cpuinfo


Not sure if this is a kernel config issue during my build but I am only
seeing a single core in my processor and there should be two :

# cat version
Linux version 4.8.16_genunix_201701076203645 (root@vesta) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Sat Jan 7 21:23:47 EST 2017
root@vesta:/proc#

root@vesta:~# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 20
model : 2
model name : AMD E-450 APU with Radeon(tm) HD Graphics
stepping : 0
microcode : 0x5000101
cpu MHz : 1650.000
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf eagerfpu pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt hw_pstate vmmcall arat npt lbrv svm_lock nrip_save pausefilter
bugs : fxsave_leak sysret_ss_attrs null_seg
bogomips : 3291.67
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate


Is there a trivial way to determine if my kernel is strictly a single core
capable build and I somehow messed up the config stage ?
 
Old 01-08-2017, 07:26 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Hello,
Your kernel seems to be SMP (there's SMP in the version line).
Quote:
dmesg|grep SMP
should also return something.

It seems to me that your BIOS it set up to show up one core only. I'd check that out first.
 
Old 01-08-2017, 08:32 PM   #3
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Original Poster
Rep: Reputation: Disabled
Not sure how helpful this is :

$ uname -a
Linux vesta 4.8.16_genunix_201701076203645 #1 SMP Sat Jan 7 21:23:47 EST 2017 x86_64 GNU/Linux
dclarke@vesta:~$ dmesg|grep SMP
[ 0.000000] Linux version 4.8.16_genunix_201701076203645 (root@vesta) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Sat Jan 7 21:23:47 EST 2017
[ 0.000000] found SMP MP-table at [mem 0x000fe1b0-0x000fe1bf] mapped at [ffff8800000fe1b0]
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 15.608500] Freeing SMP alternatives memory: 32K (ffffffff82560000 - ffffffff82568000)


Also, is there some way to enforce a fixed width font in these forums?
 
Old 01-08-2017, 08:44 PM   #4
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,121
Blog Entries: 21

Rep: Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476
Use the code tags in advance reply. The hash mark in the toolbar like so

Code:
$ inxi -f
CPU:       Dual core Intel Core i5-3320M (-HT-MCP-) cache: 3072 KB 
           clock speeds: max: 3300 MHz 1: 1263 MHz 2: 1295 MHz 3: 1302 MHz 4: 1304 MHz
           CPU Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov constant_tsc cx16 cx8 de
           ds_cpl dtes64 dtherm dts eagerfpu epb ept erms est f16c flexpriority fpu fsgsbase fxsr ht ida lahf_lm
           lm mca mce mmx monitor msr mtrr nonstop_tsc nx pae pat pbe pcid pclmulqdq pdcm pebs pge pln pni popcnt
           pse pse36 pts rdrand rdtscp sep smep smx ss sse sse2 sse4_1 sse4_2 ssse3 tm tm2 tpr_shadow tsc
           tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology xtpr
 
Old 01-09-2017, 06:22 AM   #5
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Original Poster
Rep: Reputation: Disabled
Well this is a big surprise to me :
Code:
vesta# uname -r 
4.8.16_genunix_201701076203645
vesta# inxi -f
CPU:       Single core AMD E-450 APU with Radeon HD Graphics (-UP-) cache: 512 KB clocked at 1650 MHz
           CPU Flags: 3dnowprefetch abm aperfmperf apic arat clflush cmov cmp_legacy constant_tsc cr8_legacy cx16
           cx8 de eagerfpu extapic extd_apicid fpu fxsr fxsr_opt ht hw_pstate ibs lahf_lm lbrv lm mca mce
           misalignsse mmx mmxext monitor msr mtrr nonstop_tsc nopl npt nrip_save nx pae pat pausefilter pdpe1gb
           pge pni popcnt pse pse36 rdtscp rep_good sep skinit sse sse2 sse4a ssse3 svm svm_lock syscall tsc vme
           vmmcall wdt
 
Old 01-09-2017, 02:31 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
1. how did you get the impression that you have a multicore (multithread?) cpu?
2. check from the bios, too, just to be sure.

btw, i have 2 cores but 4 (virtual?) cpus. afaiu, something similar is possible for single core cpus.
 
Old 01-09-2017, 03:40 PM   #7
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Original Poster
Rep: Reputation: Disabled
1.http://www.cpu-world.com/CPUs/Bobcat...s%20E-450.html

Also I rebooted with the stock jessie kernel :
Code:
# inxi -F -c 7
System:    Host: vesta Kernel: 3.16.0-4-amd64 x86_64 (64 bit) Console: tty 0 Distro: Debian GNU/Linux 8 
Machine:   System: LENOVO product: 4383 v: Lenovo G575 serial: 2841827601171 
           Mobo: LENOVO model: Inagua serial: CB14351327 Bios: LENOVO v: 41CN27WW(V2.03) date: 01/12/2012
CPU:       Dual core AMD E-450 APU with Radeon HD Graphics (-MCP-) cache: 1024 KB 
           Clock Speeds: 1: 825 MHz 2: 1320 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Wrestler [Radeon HD 6320]
           Display Server: X.org 1.16.4 driver: fglrx tty size: 132x43 Advanced Data: N/A for root out of X
Audio:     Card Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel 
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-amd64
Network:   Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k
           IF: wlan0 state: down mac: 9c:b7:0d:86:a7:cd
           Card-2: Qualcomm Atheros AR8152 v2.0 Fast Ethernet driver: atl1c
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: dc:0e:a1:88:e6:9e
Drives:    HDD Total Size: 320.1GB (61.8% used) ID-1: /dev/sda model: WDC_WD3200BPVT size: 320.1GB
Partition: ID-1: / size: 226G used: 145G (68%) fs: ext4 dev: /dev/sda4 
           ID-2: /boot size: 1.9G used: 489M (28%) fs: ext3 dev: /dev/sda1 
           ID-3: swap-1 size: 8.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 52.0C mobo: 0.0C 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 112 Uptime: 3 min Memory: 150.5/5584.9MB Init: systemd runlevel: 5 
           Client: Shell (bash) inxi: 2.1.28
So that solves that.

Last edited by blastwave; 01-09-2017 at 04:08 PM.
 
Old 01-09-2017, 03:48 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by blastwave View Post
Quote:
Multiprocessing ... Uniprocessor
i'm not claiming to understand this, but...


anyhoo, checked the bios?
 
Old 01-09-2017, 04:09 PM   #9
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Original Poster
Rep: Reputation: Disabled
nope .. just did a reboot and picked the default 3.16.0-4-amd64 x86_64 kernel from grub.

Clearly I need to do another rebuild.
 
Old 01-09-2017, 05:23 PM   #10
blastwave
LQ Newbie
 
Registered: Jan 2017
Location: Canada
Distribution: Debian, RHEL, Solaris, various others and LFS
Posts: 19

Original Poster
Rep: Reputation: Disabled
Turns out to be a well understood problem with kmemcheck which limits the cores to 1

see http://www.gossamer-threads.com/list...kernel/1776112

also the kmemcheck really does catch bad things early :
Code:
[   15.922948] kmemcheck: Limiting number of CPUs to 1.
[   15.923536] kmemcheck: Initialized
[   16.840319] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[   16.841856] x86: Booted up 1 node, 1 CPUs
[   16.842363] smpboot: Total of 1 processors activated (3291.74 BogoMIPS)
[   16.897732] WARNING: kmemcheck: Caught 8-bit read from freed memory (ffff880184ed0008)
[   16.897824] e01ced840188ffffffffffff00000000ffffffffffffffffa89c0a83ffffffff
[   16.899098]  i i i i i i i i f f f f f f f f f f f f f f f f f f f f f f f f
[   16.900364]                  ^
[   16.900418] RIP: 0010:[<ffffffff81290939>]  [<ffffffff81290939>] copy_mount_options+0x119/0x2c0
[   16.902502] RSP: 0018:ffff880184ecfde0  EFLAGS: 00010202
[   16.902559] RAX: ffffffffffffffff RBX: ffff880184ed0008 RCX: ffff88018464dbff
[   16.902615] RDX: 0000000000000000 RSI: 0000000000000e2e RDI: 0000000000000000
[   16.902671] RBP: ffff880184ecfde8 R08: ffff880184db91d2 R09: 0000000000001000
[   16.902727] R10: 0000000000000000 R11: ffff880184db9000 R12: ffff880185806180
[   16.902784] R13: ffff880185806190 R14: ffff880184ecfe36 R15: 0000000000008000
[   16.902841] FS:  0000000000000000(0000) GS:ffff880186200000(0000) knlGS:0000000000000000
[   16.902907] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   16.902961] CR2: ffff88018582837c CR3: 0000000002006000 CR4: 00000000000006f0
[   16.903017]  [<ffffffff81292491>] SyS_mount+0x81/0x110
[   16.903110]  [<ffffffff816cc087>] devtmpfsd+0x77/0x210
[   16.903201]  [<ffffffff81099828>] kthread+0x138/0x170
[   16.903292]  [<ffffffff819508bf>] ret_from_fork+0x1f/0x40
[   16.903383]  [<ffffffffffffffff>] 0xffffffffffffffff
[   16.904233] devtmpfs: initialized
so the trick is to remove kmemcheck and maybe go with kasan
 
Old 01-17-2017, 09:50 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
kmemcheck is a debugging tool that, AFAIK, should not normally be used:

From https://www.kernel.org/doc/menuconfi...kmemcheck.html:
Quote:
This option enables tracing of dynamically allocated kernel memory to see if memory is used before it has been given an initial value. Be aware that this requires half of your memory for bookkeeping(!!) and will insert extra code at every read and write to tracked memory thus slow down the kernel code (but user code is unaffected).

The kernel may be started with kmemcheck=0 or kmemcheck=1 to disable or enable kmemcheck at boot-time. If the kernel is started with kmemcheck=0, the large memory and CPU overhead is not incurred.
Yes, these tools can save your butt when you are debugging a kernel module, but they're not meant for production use.

Last edited by sundialsvcs; 01-17-2017 at 09:54 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cat /proc/cpuinfo showing 1 core instead of 16 ashangel Linux - Kernel 4 08-10-2012 04:33 AM
/proc/cpuinfo question rob.rice Programming 2 11-08-2009 07:52 AM
How do I know I have a Venice core from /proc/cpuinfo ? jkl555 Linux - Hardware 2 01-19-2007 11:15 AM
Proc/CpuInfo sipsipi Linux - Software 4 03-03-2006 11:42 AM
/proc/cpuinfo embsupafly Linux - General 3 12-29-2003 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration