Re: [RFC PATCH 0/4] SGX shmem backing store issue

Jarkko Sakkinen
2022-05-05T06:08:07Z

On Thu, 2022-04-28 at 13:11 -0700, Reinette Chatre wrote:

> diff --git a/tools/testing/selftests/sgx/main.c b/tools/testing/selftests/sgx/main.c
> index d480c2dd2858..12008789325b 100644
> --- a/tools/testing/selftests/sgx/main.c
> +++ b/tools/testing/selftests/sgx/main.c
> @@ -398,7 +398,7 @@ TEST_F_TIMEOUT(enclave, unclobbered_vdso_oversubscribed_remove, 900)
>          * Create enclave with additional heap that is as big as all
>          * available physical SGX memory.
>          */
> -       total_mem = get_total_epc_mem();
> +       total_mem = get_total_epc_mem()/16;
>         ASSERT_NE(total_mem, 0);
>         TH_LOG("Creating an enclave with %lu bytes heap may take a while ...",
>                total_mem);
>
> If the the test compiled with above snippet is renamed as "test_sgx_small"
> and the original renamed as "test_sgx_large" the two concurrent loops are
> run as follows:
>
> (for i in $(seq 1 999); do echo "Iteration $i"; sudo ./test_sgx_large; done ) > log.large 2>&1
> (for i in $(seq 1 9999); do echo "Iteration $i"; sudo ./test_sgx_small; done ) > log.small 2>&1

Setting up VM image to see if I could reproduce this locally.

I'll reduce the iterations to 64 and 640 to scale the test to 256 MB EPC size.

BR, Jarkko