Skip to content

[SPARK-20817][core] Fix to return "Unknown processor" on ppc and 390 platforms by Benchmark.getProcessorName() - #18042

Closed
kiszk wants to merge 1 commit into
apache:masterfrom
kiszk:SPARK-20817
Closed

[SPARK-20817][core] Fix to return "Unknown processor" on ppc and 390 platforms by Benchmark.getProcessorName() #18042
kiszk wants to merge 1 commit into
apache:masterfrom
kiszk:SPARK-20817

Conversation

@kiszk

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR fixes that Benchmark.getProcessorName() returns Unknown processor string on ppc and 390 Linux platforms.

After applying this PR, Benchmark.getProcessorName() on two Linux platforms return the following strings:

ppc64le:

POWER8E (raw), altivec supported @ 3690.000000MHz

s390x:

IBM/S390, identification = 01AFF7, machine = 2964

How was this patch tested?

Manually tested on ppc64le and s390x Linux platforms

@SparkQA

Copy link
Copy Markdown

Test build #77119 has finished for PR 18042 at commit 07a71c5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@kiszkkiszk changed the title [SPARK-20817][core] Benchmark.getProcessorName() returns "Unknown processor" on ppc and 390 platforms[SPARK-20817][core] Fix to return "Unknown processor" on ppc and 390 platforms by Benchmark.getProcessorName() May 22, 2017
@kiszk

Copy link
Copy Markdown
MemberAuthor

ping @rxin

@srowen

Copy link
Copy Markdown
Member

Does it matter that the format of the output isn't quite in the same format - is it just used for display?

@kiszk

Copy link
Copy Markdown
MemberAuthor

It is due to differences among CPU architectures. Here are original outputs of /proc/info
It is used to identify CPU architecture and its model.

POWER

> cat /proc/cpuinfo processor	: 0
cpu : POWER8E (raw), altivec supported
clock : 3690.000000MHz
revision	: 2.1 (pvr 004b 0201)
processor	: 1
cpu : POWER8E (raw), altivec supported
clock : 3690.000000MHz
revision	: 2.1 (pvr 004b 0201)
processor	: 2
cpu : POWER8E (raw), altivec supported
clock : 3690.000000MHz
revision	: 2.1 (pvr 004b 0201)
...
processor	: 158
cpu : POWER8E (raw), altivec supported
clock : 3690.000000MHz
revision	: 2.1 (pvr 004b 0201)
processor	: 159
cpu : POWER8E (raw), altivec supported
clock : 3690.000000MHz
revision	: 2.1 (pvr 004b 0201)
timebase	: 512000000
platform	: PowerNV
model : 8247-42L
machine : PowerNV 8247-42L
firmware	: OPAL v3

S390

> cat /proc/cpuinfo vendor_id : IBM/S390
# processors : 32
bogomips per cpu: 20325.00
features	: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx cache0 : level=1 type=Data scope=Private size=128K line_size=256 associativity=8
cache1 : level=1 type=Instruction scope=Private size=96K line_size=256 associativity=6
cache2 : level=2 type=Data scope=Private size=2048K line_size=256 associativity=8
cache3 : level=2 type=Instruction scope=Private size=2048K line_size=256 associativity=8
cache4 : level=3 type=Unified scope=Shared size=65536K line_size=256 associativity=16
cache5 : level=4 type=Unified scope=Shared size=491520K line_size=256 associativity=30
processor 0: version = 00, identification = 01AFF7, machine = 2964
processor 1: version = 00, identification = 01AFF7, machine = 2964
processor 2: version = 00, identification = 01AFF7, machine = 2964
processor 3: version = 00, identification = 01AFF7, machine = 2964
processor 4: version = 00, identification = 01AFF7, machine = 2964
processor 5: version = 00, identification = 01AFF7, machine = 2964
processor 6: version = 00, identification = 01AFF7, machine = 2964
processor 7: version = 00, identification = 01AFF7, machine = 2964
processor 8: version = 00, identification = 01AFF7, machine = 2964
processor 9: version = 00, identification = 01AFF7, machine = 2964
processor 10: version = 00, identification = 01AFF7, machine = 2964
processor 11: version = 00, identification = 01AFF7, machine = 2964
processor 12: version = 00, identification = 01AFF7, machine = 2964
processor 13: version = 00, identification = 01AFF7, machine = 2964
processor 14: version = 00, identification = 01AFF7, machine = 2964
processor 15: version = 00, identification = 01AFF7, machine = 2964
processor 16: version = 00, identification = 01AFF7, machine = 2964
processor 17: version = 00, identification = 01AFF7, machine = 2964
processor 18: version = 00, identification = 01AFF7, machine = 2964
processor 19: version = 00, identification = 01AFF7, machine = 2964
processor 20: version = 00, identification = 01AFF7, machine = 2964
processor 21: version = 00, identification = 01AFF7, machine = 2964
processor 22: version = 00, identification = 01AFF7, machine = 2964
processor 23: version = 00, identification = 01AFF7, machine = 2964
processor 24: version = 00, identification = 01AFF7, machine = 2964
processor 25: version = 00, identification = 01AFF7, machine = 2964
processor 26: version = 00, identification = 01AFF7, machine = 2964
processor 27: version = 00, identification = 01AFF7, machine = 2964
processor 28: version = 00, identification = 01AFF7, machine = 2964
processor 29: version = 00, identification = 01AFF7, machine = 2964
processor 30: version = 00, identification = 01AFF7, machine = 2964
processor 31: version = 00, identification = 01AFF7, machine = 2964

@srowen

Copy link
Copy Markdown
Member

Yeah I get that, but does it cause a problem? it won't if it's just for display, but that's what I'm asking.

@rxin

rxin commented May 25, 2017

Copy link
Copy Markdown
Contributor

Does this really matter? I'd rather not complicate the actual code for it to display properly in some niche hardware that very few people use.

@jiangxb1987

Copy link
Copy Markdown
Contributor

@srowen@rxin Do we still want this?

@srowen

Copy link
Copy Markdown
Member

@kiszk unless you want to make the output of this function consistent, I'd say I'm not clear that this is a good change

@kiszk

Copy link
Copy Markdown
MemberAuthor

@srowen What do you mean "consistent"? Is it good to use a consistent format "processor identification information @ clock"?
This PR make outputs of x86_64 and ppc64le similar. I could output "IBM/S390, identification = 01AFF7, machine = 2964 @ unknown clock" for s390x.

Any other great ideas are appreciated.

@srowen

Copy link
Copy Markdown
Member

For example, S390 appears to output "cpu, machine", not "cpu @ clock". If this is actually used by code somewhere it needs to be consistent right? if it's just for display, it's a nice-to-have, but still, seems nicer to output similar strings?

@kiszk

Copy link
Copy Markdown
MemberAuthor

I see. I will try to use "cpu @ clock" format.

@rxin

rxin commented Jun 23, 2017

Copy link
Copy Markdown
Contributor

Please let's not waste more time here. I don't think the gain is worth the effort required (or even the discussions here).

@srowensrowen mentioned this pull request Jun 25, 2017
@kiszkkiszk closed this Jun 27, 2017
ghost pushed a commit to dbtsai/spark that referenced this pull request Jun 27, 2017
## What changes were proposed in this pull request?
This PR proposes to close stale PRs, mostly the same instances with apache#18017
I believe the author in apache#14807 removed his account.
Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937
Added:
Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359
Added:
Closesapache#16450Closesapache#16525Closesapache#17738
Added:
Closesapache#16458Closesapache#16508Closesapache#17714
Added:
Closesapache#17830Closesapache#14742
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18417 from HyukjinKwon/close-stale-pr.
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This PR proposes to close stale PRs, mostly the same instances with apache#18017
I believe the author in apache#14807 removed his account.
Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937
Added:
Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359
Added:
Closesapache#16450Closesapache#16525Closesapache#17738
Added:
Closesapache#16458Closesapache#16508Closesapache#17714
Added:
Closesapache#17830Closesapache#14742
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18417 from HyukjinKwon/close-stale-pr.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@kiszk@SparkQA@srowen@rxin@jiangxb1987