[cgl_discussion] A question about CGL2.0 Draft Req. 6.Pin.2: limit

Li, Adam adam.li at intel.com
Sun May 11 20:15:05 PDT 2003


Hi all,

In OSDL Carrier Grade Linux Working Group General System Requirements, Release 2 Public Draft Version 2003-03-17 
Page29:

6.Pin.2: Application Pin Page: Application Pin Page Limits says:
"The total amount of memory pinned by applications needs to be able to be specified. This is needed to avoid overloading a system.

Existing mlock() enforces limits based on the RLIMIT_MEMLOCK setting for the executing process. A global limit is needed as a complementary control for allowing non.root processes to pin pages.

The application will receive an error code if all requested memory cannot be pinned. Return conditions shall be similar to current mlock() behaviour."


For the mlock() implementation, I think the limit RLIMIT_MEMELOCK is enough for this requirement, if whenever a non-root user logs into the system, a process owned by the superuser will invoke setrlimit( ) to decrease the rlim_max and rlim_cur fields for RLIMIT_MEMLOCK. So that non-root process cannot  lock pages above the limit.

 " A global limit is needed as a complementary control for allowing non.root processes to pin pages." What does this "global limit" mean? 
Why do we need "global limit as a complementary control" since we already have RLIMIT_MEMLOCK?

Could someone help me to understand this? 

Thanks a lot.

====================================================================
Information above represents only my personal view, not corporate.  
Adam Li  [Li Yi]
Intel China Software Lab
Tel:  86-21-5257-4545-1338
adam.li at intel.com





More information about the cgl_discussion mailing list