Resurrecting the VM_PINNED discussion

From: Eric B Munson
Date: Tue Mar 03 2015 - 12:41:11 EST


All,

After LSF/MM last year Peter revived a patch set that would create
infrastructure for pinning pages as opposed to simply locking them.
AFAICT, there was no objection to the set, it just needed some help
from the IB folks.

Am I missing something about why it was never merged? I ask because
Akamai has bumped into the disconnect between the mlock manpage,
Documentation/vm/unevictable-lru.txt, and reality WRT compaction and
locking. A group working in userspace read those sources and wrote a
tool that mmaps many files read only and locked, munmapping them when
they are no longer needed. Locking is used because they cannot afford a
major fault, but they are fine with minor faults. This tends to
fragment memory badly so when they started looking into using hugetlbfs
(or anything requiring order > 0 allocations) they found they were not
able to allocate the memory. They were confused based on the referenced
documentation as to why compaction would continually fail to yield
appropriately sized contiguous areas when there was more than enough
free memory.

I would like to see the situation with VM_LOCKED cleared up, ideally the
documentation would remain and reality adjusted to match and I think
Peter's VM_PINNED set goes in the right direction for this goal. What
is missing and how can I help?

Thanks,
Eric

Attachment: signature.asc
Description: Digital signature