Skip to content

Conversation

@kiszk
Copy link
Member

@kiszk kiszk commented May 20, 2017

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

SparkQA commented May 20, 2017

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.

@kiszk kiszk 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
Member Author

kiszk commented May 24, 2017

ping @rxin

@srowen
Copy link
Member

srowen commented May 25, 2017

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
Member Author

kiszk commented May 25, 2017

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
Member

srowen commented May 25, 2017

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
Copy link
Contributor

rxin commented May 25, 2017

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
Contributor

@srowen @rxin Do we still want this?

@srowen
Copy link
Member

srowen commented Jun 22, 2017

@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
Member Author

kiszk commented Jun 22, 2017

@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
Member

srowen commented Jun 22, 2017

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
Member Author

kiszk commented Jun 23, 2017

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

@rxin
Copy link
Contributor

rxin commented Jun 23, 2017

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

@srowen srowen mentioned this pull request Jun 25, 2017
@kiszk kiszk 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.

Closes apache#7075
Closes apache#8927
Closes apache#9202
Closes apache#9366
Closes apache#10861
Closes apache#11420
Closes apache#12356
Closes apache#13028
Closes apache#13506
Closes apache#14191
Closes apache#14198
Closes apache#14330
Closes apache#14807
Closes apache#15839
Closes apache#16225
Closes apache#16685
Closes apache#16692
Closes apache#16995
Closes apache#17181
Closes apache#17211
Closes apache#17235
Closes apache#17237
Closes apache#17248
Closes apache#17341
Closes apache#17708
Closes apache#17716
Closes apache#17721
Closes apache#17937

Added:
Closes apache#14739
Closes apache#17139
Closes apache#17445
Closes apache#18042
Closes apache#18359

Added:
Closes apache#16450
Closes apache#16525
Closes apache#17738

Added:
Closes apache#16458
Closes apache#16508
Closes apache#17714

Added:
Closes apache#17830
Closes apache#14742

## How was this patch tested?

N/A

Author: hyukjinkwon <[email protected]>

Closes apache#18417 from HyukjinKwon/close-stale-pr.
Sign up for free to 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