<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/mm/hmm.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-11-13T19:12:43Z</updated>
<entry>
<title>mm/hmm: fix race between hmm_mirror_unregister() and mmu_notifier callback</title>
<updated>2018-11-13T19:12:43Z</updated>
<author>
<name>Ralph Campbell</name>
</author>
<published>2018-10-30T22:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d09d8eaa18067e38d74dfe9f9e6c578bfd32a4d9'/>
<id>urn:sha1:d09d8eaa18067e38d74dfe9f9e6c578bfd32a4d9</id>
<content type='text'>
commit 86a2d59841ab0b147ffc1b7b3041af87927cf312 upstream.

In hmm_mirror_unregister(), mm-&gt;hmm is set to NULL and then
mmu_notifier_unregister_no_release() is called.  That creates a small
window where mmu_notifier can call mmu_notifier_ops with mm-&gt;hmm equal to
NULL.  Fix this by first unregistering mmu notifier callbacks and then
setting mm-&gt;hmm to NULL.

Similarly in hmm_register(), set mm-&gt;hmm before registering mmu_notifier
callbacks so callback functions always see mm-&gt;hmm set.

Link: http://lkml.kernel.org/r/20181019160442.18723-4-jglisse@redhat.com
Signed-off-by: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Reviewed-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: Balbir Singh &lt;bsingharora@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mm, dev_pagemap: Do not clear -&gt;mapping on final put</title>
<updated>2018-09-09T08:32:41Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2018-07-14T04:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ad671c8520d49ef4d50f8d30a3f82288d9289a5'/>
<id>urn:sha1:5ad671c8520d49ef4d50f8d30a3f82288d9289a5</id>
<content type='text'>
commit 2fa147bdbf672c53386a8f5f2c7fe358004c3ef8 upstream.

MEMORY_DEVICE_FS_DAX relies on typical page semantics whereby -&gt;mapping
is only ever cleared by truncation, not final put.

Without this fix dax pages may forget their mapping association at the
end of every page pin event.

Move this atypical behavior that HMM wants into the HMM -&gt;page_free()
callback.

Cc: &lt;stable@vger.kernel.org&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Fixes: d2c997c0f145 ("fs, dax: use page-&gt;mapping...")
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS</title>
<updated>2018-05-22T13:59:39Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2018-05-16T18:46:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7638488434415aa478e78435cac8f0365737638'/>
<id>urn:sha1:e7638488434415aa478e78435cac8f0365737638</id>
<content type='text'>
In preparation for fixing dax-dma-vs-unmap issues, filesystems need to
be able to rely on the fact that they will get wakeups on dev_pagemap
page-idle events. Introduce MEMORY_DEVICE_FS_DAX and
generic_dax_page_free() as common indicator / infrastructure for dax
filesytems to require. With this change there are no users of the
MEMORY_DEVICE_HOST designation, so remove it.

The HMM sub-system extended dev_pagemap to arrange a callback when a
dev_pagemap managed page is freed. Since a dev_pagemap page is free /
idle when its reference count is 1 it requires an additional branch to
check the page-type at put_page() time. Given put_page() is a hot-path
we do not want to incur that check if HMM is not in use, so a static
branch is used to avoid that overhead when not necessary.

Now, the FS_DAX implementation wants to reuse this mechanism for
receiving dev_pagemap -&gt;page_free() callbacks. Rework the HMM-specific
static-key into a generic mechanism that either HMM or FS_DAX code paths
can enable.

For ARCH=um builds, and any other arch that lacks ZONE_DEVICE support,
care must be taken to compile out the DEV_PAGEMAP_OPS infrastructure.
However, we still need to support FS_DAX in the FS_DAX_LIMITED case
implemented by the s390/dcssblk driver.

Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Reported-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Reported-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: "Jérôme Glisse" &lt;jglisse@redhat.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>mm/hmm.c: remove superfluous RCU protection around radix tree lookup</title>
<updated>2018-04-11T17:28:31Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2018-04-10T23:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18be460eeb2cd3f4bfb6498b10ce5b800f9a20ea'/>
<id>urn:sha1:18be460eeb2cd3f4bfb6498b10ce5b800f9a20ea</id>
<content type='text'>
hmm_devmem_find() requires rcu_read_lock_held() but there's nothing which
actually uses the RCU protection.  The only caller is
hmm_devmem_pages_create() which already grabs the mutex and does
superfluous rcu_read_lock/unlock() around the function.

This doesn't add anything and just adds to confusion.  Remove the RCU
protection and open-code the radix tree lookup.  If this needs to become
more sophisticated in the future, let's add them back when necessary.

Link: http://lkml.kernel.org/r/20180314194515.1661824-4-tj@kernel.org
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: use device driver encoding for HMM pfn</title>
<updated>2018-04-11T17:28:31Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f88a1e90c665408732ab16ea48e1a182dce597a2'/>
<id>urn:sha1:f88a1e90c665408732ab16ea48e1a182dce597a2</id>
<content type='text'>
Users of hmm_vma_fault() and hmm_vma_get_pfns() provide a flags array and
pfn shift value allowing them to define their own encoding for HMM pfn
that are fill inside the pfns array of the hmm_range struct.  With this
device driver can get pfn that match their own private encoding out of HMM
without having to do any conversion.

[rcampbell@nvidia.com: don't ignore specific pte fault flag in hmm_vma_fault()]
  Link: http://lkml.kernel.org/r/20180326213009.2460-2-jglisse@redhat.com
[rcampbell@nvidia.com: clarify fault logic for device private memory]
  Link: http://lkml.kernel.org/r/20180326213009.2460-3-jglisse@redhat.com
Link: http://lkml.kernel.org/r/20180323005527.758-16-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Signed-off-by: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: change hmm_vma_fault() to allow write fault on page basis</title>
<updated>2018-04-11T17:28:31Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2aee09d8c1164219971c7b396f2235bd5334018c'/>
<id>urn:sha1:2aee09d8c1164219971c7b396f2235bd5334018c</id>
<content type='text'>
This changes hmm_vma_fault() to not take a global write fault flag for a
range but instead rely on caller to populate HMM pfns array with proper
fault flag ie HMM_PFN_VALID if driver want read fault for that address or
HMM_PFN_VALID and HMM_PFN_WRITE for write.

Moreover by setting HMM_PFN_DEVICE_PRIVATE the device driver can ask for
device private memory to be migrated back to system memory through page
fault.

This is more flexible API and it better reflects how device handles and
reports fault.

Link: http://lkml.kernel.org/r/20180323005527.758-15-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: factor out pte and pmd handling to simplify hmm_vma_walk_pmd()</title>
<updated>2018-04-11T17:28:31Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53f5c3f489ecddc7570a2e2422a6fc5b25007b9d'/>
<id>urn:sha1:53f5c3f489ecddc7570a2e2422a6fc5b25007b9d</id>
<content type='text'>
No functional change, just create one function to handle pmd and one to
handle pte (hmm_vma_handle_pmd() and hmm_vma_handle_pte()).

Link: http://lkml.kernel.org/r/20180323005527.758-14-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: move hmm_pfns_clear() closer to where it is used</title>
<updated>2018-04-11T17:28:30Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33cd47dcbba068850eb73f00cc41090ba26c1e9b'/>
<id>urn:sha1:33cd47dcbba068850eb73f00cc41090ba26c1e9b</id>
<content type='text'>
Move hmm_pfns_clear() closer to where it is used to make it clear it is
not use by page table walkers.

Link: http://lkml.kernel.org/r/20180323005527.758-13-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: rename HMM_PFN_DEVICE_UNADDRESSABLE to HMM_PFN_DEVICE_PRIVATE</title>
<updated>2018-04-11T17:28:30Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2744118a65efee90aea95f7cd31bf74eb8009f8'/>
<id>urn:sha1:b2744118a65efee90aea95f7cd31bf74eb8009f8</id>
<content type='text'>
Make naming consistent across code, DEVICE_PRIVATE is the name use outside
HMM code so use that one.

Link: http://lkml.kernel.org/r/20180323005527.758-12-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/hmm: do not differentiate between empty entry or missing directory</title>
<updated>2018-04-11T17:28:30Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2018-04-10T23:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5504ed29692faad06ea74c4275e96a8ffc83a1e1'/>
<id>urn:sha1:5504ed29692faad06ea74c4275e96a8ffc83a1e1</id>
<content type='text'>
There is no point in differentiating between a range for which there is
not even a directory (and thus entries) and empty entry (pte_none() or
pmd_none() returns true).

Simply drop the distinction ie remove HMM_PFN_EMPTY flag and merge now
duplicate hmm_vma_walk_hole() and hmm_vma_walk_clear() functions.

Link: http://lkml.kernel.org/r/20180323005527.758-11-jglisse@redhat.com
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Evgeny Baskakov &lt;ebaskakov@nvidia.com&gt;
Cc: Ralph Campbell &lt;rcampbell@nvidia.com&gt;
Cc: Mark Hairgrove &lt;mhairgrove@nvidia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
