When creating private mapping for /dev/zero, the driver makes it an> It seems pointless to keep such special case. Making private /dev/zero> mapping a full anonymous mapping doesn't change the semantic of
anonymous mapping by calling set_vma_anonymous(). But it just sets
vm_ops to NULL, vm_file is still valid and vm_pgoff is also file offset.
This is a special case and the VMA doesn't look like either anonymous VMA
or file VMA. It confused other kernel subsystem, for example, khugepaged [1].
/dev/zero either.
The user visible effect is the mapping entry shown in /proc/<PID>/smaps
and /proc/<PID>/maps.
Before the change:
ffffb7190000-ffffb7590000 rw-p 00001000 00:06 8 /dev/zero
After the change:
ffffb6130000-ffffb6530000 rw-p 00000000 00:00 0