>> So, the question is -- what should the mremap() behavior be for shared anonymous mappings? >> Should it truncate the file to match the grown-up vma length? If yes, should it also >> truncate it if we mremap() the mapping to the smaller size? > > I think the answer is 'no' for both cases. It's ABI change. > > Should we introduce mtruncate() syscall which will truncate backing fail > in both cases? ;) > If we don't touch kernel mremap, then mtruncate can be done in glibc via /proc/pid/map_files :) Thanks, Pavel -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>