Page MenuHomeFreeBSD

Skip Linux madvise(MADV_DONTNEED) on unmanaged objects.
ClosedPublic

Authored by markj on Aug 17 2020, 1:06 PM.
Tags
None
Referenced Files
F132483004: D26084.id75890.diff
Fri, Oct 17, 7:25 AM
Unknown Object (File)
Fri, Oct 10, 11:27 AM
Unknown Object (File)
Thu, Oct 9, 11:58 PM
Unknown Object (File)
Sun, Oct 5, 12:31 AM
Unknown Object (File)
Sat, Oct 4, 3:58 PM
Unknown Object (File)
Fri, Oct 3, 3:11 PM
Unknown Object (File)
Fri, Sep 19, 9:58 PM
Unknown Object (File)
Sep 13 2025, 7:46 AM
Subscribers

Details

Summary

I noticed this while reviewing the non-transparent superpages patch.
vm_object_madvise() is a no-op for unmanaged objects, but we should
limit the scope of mappings on which we'll call pmap_remove(). In
particular, with largepage objects we must remove mappings along
superpage boundaries.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Aug 17 2020, 1:06 PM
markj created this revision.

I do not object, but is there a way for linux process to ever mmap largepage ?

Hmm, perhaps freebsd process can shm_open, then pass fd to linux process over unix socket, and then linux process can mmap(fd) ?

This revision is now accepted and ready to land.Aug 17 2020, 3:57 PM
In D26084#579065, @kib wrote:

I do not object, but is there a way for linux process to ever mmap largepage ?

Hmm, perhaps freebsd process can shm_open, then pass fd to linux process over unix socket, and then linux process can mmap(fd) ?

That's what I was thinking. Or, maybe the fd can be inherited over execve(). I am not sure if the implicit O_CLOEXEC for shm objects can be cleared.