Speaking of the man page, I see also that huge pages are addressed there and when a huge page is used it says: "The system automatically aligns length to be a multiple of the underlying huge page size" And so I believes that means we need to check for the huge page on filemap_map_pages() and also the test and adjust it to align to the specific huge page size if used... Or just skip tmpfs / hugetlbfs for now... Luis