lkml.org 
[lkml]   [2004]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mlock(1)
Neil Horman wrote:
> Jeff Garzik wrote:
>
>>
>> How feasible is it to create an mlock(1) utility, that would allow
>> priveleged users to execute a daemon such that none of the memory the
>> daemon allocates will ever be swapped out?
>>
>> ntp daemon does mlock(2) internally, for example, but IMHO this is
>> really a policy decision that could be moved out of the app.
>>
>> Unfortunately I am VM-ignorant as always ;-)
>>
>> Jeff
>>
>
> I think it would be pretty easy to do. Since mlock(2) operates on the
> calling processes vma tree you'd need an interface to the kernel that
> let you specify a child process and an address range to lock. Then in
> the kernel you'd need to translate the pid into task struct and
> replicate the functionality of sys_mlock without the assumption that
> current points to the task that you're modifying. Sounds like something
> you could do pretty easy with a proc file in fact.
>
>
> Neil
>
>>
>>
>> -

Clarification: didn't mean to say child process there. Any process
would be modifiable with this interface I think.
Neil

--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*nhorman@redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site