[ 
https://issues.apache.org/jira/browse/HADOOP-11505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14288833#comment-14288833
 ] 

Binglin Chang commented on HADOOP-11505:
----------------------------------------

Hi Colin, thanks for working on this. More background about this issue:
1. The nativetask code is only optimized for x86_64, so some function names are 
not ideal. like the name "bswap" are little confusing, it is used for "ntoh" 
purpose. 
2. so on all bigendian arch, bswap should be nop.
3. I guess the use of inline assembly is because very old compilers(like gcc3 I 
use back at baidu)  don't optimize bit shift style ntoh function as bswap 
asembly, but most compilers do that now, so not sure the inline assembly is 
needed any more. 

So I think a more clean way to fix this is to define ntoh32 and noth64 
properly(use bit shift rather than assembly should be OK for modern compilers) 
based on BYTE_ORDER macro, and replace all bswap. 

> hadoop-mapreduce-client-nativetask fails to use x86 optimizations in some 
> cases
> -------------------------------------------------------------------------------
>
>                 Key: HADOOP-11505
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11505
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HADOOP-11505.001.patch
>
>
> hadoop-mapreduce-client-nativetask fails to use x86 optimizations in some 
> cases.  Also, on some alternate, non-x86, non-ARM architectures the generated 
> code is incorrect.  Thanks to Steve Loughran and Edward Nevill for finding 
> this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to