All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible PMD (huge pages) bug in fs dax
@ 2022-11-15 21:15 Eliot Moss
  0 siblings, 0 replies; only message in thread
From: Eliot Moss @ 2022-11-15 21:15 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang; +Cc: nvdimm

Folks - I posted already on nvdimm, but perhaps the topic did not quite grab
anyone's attention.  I had had some trouble figuring all the details to get
dax mapping of files from an xfs file system with underlying Optane DC memory
going, but now have that working reliably.  But there is an odd behavior:

When first mapping a file, I request mapping a 32 Gb range, aligned on a 1 Gb
(and thus clearly on a 2 Mb) boundary.

For each group of 8 Gb, the first 4095 entries map with a 2 Mb huge (PMD)
page.  The 4096th one does FALLBACK.  I suspect some problem in
dax.c:grab_mapping_entry or its callees, but am not personally well enough
versed in either the dax code or the xarray implementation to dig further.


If you'd like a second puzzle :-) ... after completing this mapping, another
thread accesses the whole range sequentially.  This results in NOPAGE fault
handling for the first 4095+4095 2M regions that previously resulted in
NOPAGE -- so far so good.  But it gives FALLBACK for the upper 16 Gb (except
the two PMD regions it alrady gave FALLBACK for).


I can provide trace output from a run if you'd like and all the ndctl, gdisk
-l, fdisk -l, and xfs_info details if you like.


In my application, it would be nice if dax.c could deliver 1 Gb PUD size
mappings as well, though it would appear that that would require more surgery
on dax.c.  It would be somewhat analogous to what's already there, of course,
but I don't mean to minimize the possible trickiness of it.  I realize I
should submit that request as a separate thread :-) which I intend to do
later.

Regards - Eliot Moss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-15 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 21:15 Possible PMD (huge pages) bug in fs dax Eliot Moss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.