Albrecht Uhlmann
|
Re: First time device open is taking more time
|
Albrecht Uhlmann
10/11/2019 10:29 AM
post120030
|
Re: First time device open is taking more time
Two things can contribute to thie first-time delay:
1) loading code of your resource manager that never ran before from media into RAM. Later, it will come from cache.
2) allocating stack pages on first use.
regarding 1), try to copy executable to RAM disk and see if this has an influence
regarding 2), make all stacks not-lazy, or do a suffucient dummy alloca() statement to force stack page allcoation
(remember, main() thread stack attributed cannot be changed since it is already running)
You can also run a kernel trace while doing the first accesses to your resource manager, and you will see both events.
Regards,
Albrecht
|
|
|