On Tue 19-06-18 14:13:05, Yang Shi wrote:
[...]
On 6/19/18 3:02 AM, Peter Zijlstra wrote:
I didn't get to read your patches carefully yet but I am wondering whyHold up, two things: you having to copy most of do_munmap() didn't seemYes, they will be extracted into a helper function in the next version.
to suggest a helper function? And second, since when are we allowed to
May bad, I don't think it is allowed. We could reform this to:
acquire write mmap_sem
vma lookup (split vmas)
release write mmap_sem
acquire read mmap_sem
zap pages
release read mmap_sem
I'm supposed this is safe as what Michal said before.
do you need to split in the first place. Why cannot you simply unmap the
range (madvise(DONTNEED)) under the read lock and then take the lock for
write to finish the rest?