Re: Enable/disable hardware prefetcher via Oprofile

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 06/04/2015 02:19 PM, Mahmood N wrote:
>> msr-tools should work on both
> 
> It seems that ./wrmsr gets a binary value but I am not sure about that
> 
> [root@tiger msr-tools-master]# ./wrmsr -p 0 0xc0011022 1000
> [root@tiger msr-tools-master]# ./rdmsr -p 0 -d -0 0xc0011022
> 00000000000000000008
> [root@tiger msr-tools-master]# ./wrmsr -p 0 0xc0011022 10000
> [root@tiger msr-tools-master]# ./rdmsr -p 0 -d -0 0xc0011022
> 00000000000000009232
> 
> I expected to see 16 because the decimal value of 10000b is 16.
> Looking through the code (wrmsr.c) however it get integer values
> 
> 
>  
> Regards,
> Mahmood
> 
> 
> 
> 
> 

Hi Mahmood,

It might be useful to use the rdmsr -x option to see what the values are in the msr and pass things in to wrmsr as hexidecimal values. wrmsr is interpreting the values above as decimal, use form 0x[0-9a-f]+.  Unlike general registers it is likely that some bits in msr registers might be fixed to be 1 or 0 when read.  According to the BIOS manual there are a number of reserved bits in that particular MSR.

-Will

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.