[gobolinux-users] Prevent a process from paging out

Theyranos theyranos at gmail.com
Sat Sep 9 00:34:53 UTC 2006


Hm. I tried this, and it worked exactly once. After that, all  
attempts to use evrouter gave an error message saying something like  
"no devices were opened," which means to me that probably, the first  
launch locked some piece of shared memory that future evrouter  
instances also needed. Obviously the fix would be to add a  
corresponding munlockall, but the only way to stop evrouter is to  
kill it, and I know absolutely nothing about signal handling in C.

At the moment, I'm running standard evrouter. When I have more time  
(probably tomorrow), I'll figure out the signal handling stuff and  
add the appropriate munlockall to check whether it solves the problem.

Thanks!


> man 2 mlock
>
> It'll require patching the source.  A quick ugly hack would be:
>
> add "#include <sys/mman.h>" with other headers
> add "mlockall(MCL_FUTURE)" towards the beginning of main()
>
> Good luck.  If you have problems check the return code, also see the
> section on Limits and permissions in the manpage.
>
> On 9/8/06, Dan <theyranos at gmail.com> wrote:
>> I use evrouter (http://www.bedroomlan.org/~alexios/
>> coding_evrouter.html) to make the extra buttons on my Logitech mouse
>> do stuff. I've noticed recently that if I don't use it for a while,
>> it can take as much as a minute for the button press to have any
>> result, whereas if evrouter has done something recently, the response
>> is instantaneous.
>>
>> The only guess I have as to why this is happening is the swap file.
>> My hard drives are painfully slow, so paging in evrouter could
>> definitely explain the delay. Does anyone know a way (other than
>> buying more RAM) to prevent the machine from using the swap file for
>> a specific process?
>>
>> Thanks
>> Dan
>> _______________________________________________
>> gobolinux-users mailing list
>> gobolinux-users at lists.gobolinux.org
>> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
>>
>
>
> -- 
> Carlo J. Calica
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users



More information about the gobolinux-users mailing list