Thread (6 messages) 6 messages, 3 authors, 2021-05-26

Re: Multi pthreaded RT application - mlock doubt

From: Dipen Patel <dipenp@nvidia.com>
Date: 2021-05-25 03:02:07

Gentle ping on my below doubt...

Thanks,
Best Regards,
Dipen Patel

On 3/31/21 7:06 PM, Dipen Patel wrote:
Hi,

I was following https://rt.wiki.kernel.org/index.php/Threaded_RT-application_with_memory_locking_and_stack_handling_example with some below changes:

1. Added 8 threads
2. Moved show_new_pagefault_count logic inside thread function once thread starts running as below:

thread_fn {

	getrusage(RUSAGE_SELF, &usage);
	
	print and save usage.ruminflt;

	prove_thread_stack_use_is_safe

	getrusage(RUSAGE_SELF, &usage);

	print usage.ruminflt - last_saved_cnt;
}

I observed there are still page faults (although not in big numbers as if there was no mlock), after touching stack in prove_thread_stack_use_is_safe call. I played around with MY_STACK_SIZE (from 1KB to 1MB) but still see minor page faults.

I am running 4.9.201_rt134 kernel. Any idea what I will be missing?

Best Regards,
Dipen Patel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help