Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1445 Discussions

EPC allocation policy on multisocket machines - Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz

boukhari
Beginner
567 Views

Hello,

I am writing an intel sgx application on a multisocket machine. I am running some benchmarks and I need to do numa aware allocation inside the enclave. Is there a way I can force the enclave to allocate EPC pages on a specific numa socket? If that's not possible, how can I check on which numa socket are the epc pages being allocated? Is there a default policy for allocation?

Cheers,

Yassine 

0 Kudos
1 Solution
Sahira_Intel
Moderator
510 Views

Hi,

If you are using Linux kernel 5.13 or newer with the SGX driver built in, it already has basic NUMA-aware allocation build in. This means that it will try to allocate all required EPC for a given enclave on a single CPU (so it won't span memory allocation across the sockets). You can read more about the patch here.


Sincerely,

Sahira


View solution in original post

0 Kudos
3 Replies
Sahira_Intel
Moderator
511 Views

Hi,

If you are using Linux kernel 5.13 or newer with the SGX driver built in, it already has basic NUMA-aware allocation build in. This means that it will try to allocate all required EPC for a given enclave on a single CPU (so it won't span memory allocation across the sockets). You can read more about the patch here.


Sincerely,

Sahira


0 Kudos
boukhari
Beginner
507 Views

Hi,

Is there a way to force the enclave to do cross numa allocation? I need this feature to do some benchmarking regarding the memory access latencies in case of cross numa memory access ?

0 Kudos
Sahira_Intel
Moderator
476 Views

Hi,

There is no out of box way to force the enclave to do cross numa allocation. You would need to modify the kernel driver in order to accomplish this.

 

Sincerely,

Sahira 

0 Kudos
Reply