All of lore.kernel.org
 help / color / mirror / Atom feed
* Multi pthreaded RT application - mlock doubt
@ 2021-04-01  2:06 Dipen Patel
  2021-05-25  3:08 ` Dipen Patel
  2021-05-25  7:26 ` Ahmed S. Darwish
  0 siblings, 2 replies; 6+ messages in thread
From: Dipen Patel @ 2021-04-01  2:06 UTC (permalink / raw)
  To: linux-rt-users

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-26 10:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  2:06 Multi pthreaded RT application - mlock doubt Dipen Patel
2021-05-25  3:08 ` Dipen Patel
2021-05-25  7:26 ` Ahmed S. Darwish
2021-05-25 22:24   ` Dipen Patel
2021-05-26  8:31     ` Ahmed S. Darwish
2021-05-26 10:26       ` John Ogness

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.