Re: remap_file_pages() use

From: Hugh Dickins
Date: Wed May 21 2014 - 00:34:13 EST


On Tue, 20 May 2014, Kenny Simpson wrote:

> I might need a gentle nudge with a clue stick...
> checking against latest git tree it looks as though most common
> filesystem types do support remap_file_pages.
>
> I just wrote a simple test case and it worked on my 3.13-based ubuntu
> 14.04 system on an ext4 filesystem.

It is all very confusing, yes.

When Kirill said disk-backed files don't support remap_file_pages since
commit 3ee6dafc677a, he was meaning that that they do not support it
with a special nonlinear vma; but the remap_file_pages syscall emulates
the layout for them with separate linear vmas instead.

Confusingly, these filesystems opt in to this emulation by pointing
their remap_pages method to generic_file_remap_pages - code which is
then never used for them! tmpfs is the only filesystem (having no
page_mkwrite) which actually passes through that code.

You can understand why there's some enthusiasm for cleaning this up :)

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/