linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mlock() on DAX returns -ENOMEM
@ 2015-04-12 12:56 Yigal Korman
  2015-04-13 12:56 ` Kirill A. Shutemov
  0 siblings, 1 reply; 5+ messages in thread
From: Yigal Korman @ 2015-04-12 12:56 UTC (permalink / raw)
  To: linux-fsdevel, Matthew Wilcox

Hi,
I've tried to mlock() a range of an ext4-dax file and got "-ENOMEM" in return.
Looking at the code, it seems that this is related to the fact that
DAX uses VM_MIXEDMAP and mlock assumes/requires regular page cache.
To me it seems that DAX should simply return success in mlock() as all
data is always in memory and no swapping is possible.
Is this a bug or intentional? Is there a fix planned?

Also, the same code path that is used in mlock is also used for
MAP_POPULATE (pre-fault pages in mmap) so this flag doesn't work as
well (doesn't fail but simply doesn't pre-fault anything).

Thanks,
Yigal

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-14 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-12 12:56 mlock() on DAX returns -ENOMEM Yigal Korman
2015-04-13 12:56 ` Kirill A. Shutemov
2015-04-14 10:27   ` Yigal Korman
2015-04-14 11:42     ` Kirill A. Shutemov
2015-04-14 19:44       ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).