Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Setting Write Combine memory type.

Jaeyoung__Choi
Beginner
2,162 Views

Hi.

I was trying to set memory type as Write combine because I want to use 'movntdqa' instructions.

I found the set_memory_wc() function in kernel code which take the memory address and size as argument.

In that function, It convert the logical address to physical address by using __pa() function.

As far as I know __pa() function is only valid when the address is kernel logical address space.

So I don't know the set_memory_wc() function is also can be called by user process.

I have implemented the custom system call which call set_memory_wc() function and used in user process but I generate error.

The error message was " CPA: called for zero pte.". I think this error is due to I am calling that function is user address space.

Then Is there any way to set memory type to write combine in address space??

Thank you in advance.

 

 

 

0 Kudos
1 Reply
McCalpinJohn
Honored Contributor III
2,162 Views

The WC memory type is typically only used for memory-mapped IO regions, not for system memory regions.

The MOVNTDQA instruction is intended to provide concurrent 64-Byte transfers from memory-mapped IO regions.  This is not needed for system memory regions because the WriteBack memory type already provides 64-Byte transfers and concurrency.

The hardware should support using the WC type for system memory, but this is not a target that an operating system is likely to be set up for.

0 Kudos
Reply