Hugh Dickins wrote:The result of counting only VM_SHARED file mappings in shared_vm is that it no longer includes MAP_PRIVATE file mappings. These file mappings are shared until they are written to, at which point they become private. The vm doesn't currently track this change from shared to private, so either way the accounting is off by a bit. But the intention of the private mapping is to not share the page with other processes, so I think the right thing to do is to charge the process with this memory usage as private memory. I am continuing to make the assumption that the code already made that all VM_EXEC mappings are also shared. But one thing that has changed is that when a mapping is no longer VM_EXEC, it is also no longer counted as shared, but as private, and charged to the data size. This has generally little effect on /proc/pid/stats VmData. One of the motivations for this change was to make it easier for a system administrator to manage processes that could allocate large amounts of private memory, either through malloc() or through mmap(), possibly due to programming errors. As Dave also pointed out, if these processes need to be able to attach to large shared memory segments, such as a database buffer cache, then attempting to control the memory usage of these processes with RLIMIT_AS becomes very tricky. The sysadmin may set the RLIMIT_AS to the current buffer cache shared memory segment size of say 8GB plus 200M for process private allocations, but the next day the DBA decides to increase the shared memory segment to 10GB, and wonders why his processes won't start. Now, with RLIMIT_DATA being effective again, all that is needed is to set RLIMIT_DATA to a reasonable value for the application. I don't anticipate that a lot of people need to be concerned about the effect of this resource limit change. By default RLIMIT_DATA is set to unlimited. For those who do want to set it, they will need to understand what it does, just like any other resource limit. Perhaps an update of the man page is in order as well. Thanks, Herbert. -
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Martin Michlmayr | Network slowdown due to CFS |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Yaroslav Tarasenko | Re: PC-BSD |
| Ben Cadieux | DragonFly MBR |
| justin | Re: dragonfly pdf documentation |
| dark0s Optik | DragonFly over Sony Vaio |
