tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: AMAP_SHARED (was Re: XIP)

> - AMAP_SHARED itself is a fine concept; it's used by shared memory.
>       sys/kern/sysv_shm.c:
>           452         error = uvm_map(&vm->vm_map, &attach_va, size, uobj, 0, 
> 0,
>           453             UVM_MAPFLAG(prot, prot, UVM_INH_SHARE, 
> UVM_ADV_RANDOM, flags));
>   I guess MAP_INHERIT_SHARE was added because adding it was easy
>   after shared amap was implemented for shared memory?

MAP_INHERIT_SHARE was originally MAP_INHERIT, and came from

> - For highly tuned, XIP'ed systems, programs should be designed to
>   avoid .data, because they're COW'ed to page cache sooner or later.

why is this a problem?

if the data is needed, and it will be written to, then these pages
will be allocated (COW'd) eventually, and the same space will be used.


Home | Main Index | Thread Index | Old Index