Displaying 10 results from an estimated 10 matches for "dev_pagemap_put_ops".
Did you mean:
dev_pagemap_get_ops
2019 Jun 17
0
[PATCH 10/25] memremap: lift the devmap_enable manipulation into devm_memremap_pages
...peration set and take care of the
static key enable, as well as the put using device managed resources.
Also check that a ->page_free is provided for the pgmaps types that
require it, and check for a valid type as well while we are at it.
Note that this also fixes the fact that hmm never called
dev_pagemap_put_ops and thus would leave the slow path enabled forever,
even after a device driver unload or disable.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvdimm/pmem.c | 23 +++--------------
include/linux/mm.h | 10 --------
kernel/memremap.c | 57 ++++++++++++++++++++++++++----...
2019 Jun 13
0
[PATCH 09/22] memremap: lift the devmap_enable manipulation into devm_memremap_pages
...it a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index b9638c6553a1..66837eed6375 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -334,11 +334,6 @@ static void pmem_release_disk(void *__pmem)
put_disk(pmem->disk);
}
-static void pmem_release_pgmap_ops(void *__pgmap)
-{
- dev_pagemap_put_ops();
-}
-
static void pmem_fsdax_page_free(struct page *page, void *data)
{
wake_up_var(&page->_refcount);
@@ -353,16 +348,6 @@ static const struct dev_pagemap_ops pmem_legacy_pagemap_ops = {
.kill = pmem_kill,
};
-static int setup_pagemap_fsdax(struct device *dev, struct dev_pagema...
2019 Jun 26
0
[PATCH 11/25] memremap: lift the devmap_enable manipulation into devm_memremap_pages
...peration set and take care of the
static key enable, as well as the put using device managed resources.
Also check that a ->page_free is provided for the pgmaps types that
require it, and check for a valid type as well while we are at it.
Note that this also fixes the fact that hmm never called
dev_pagemap_put_ops and thus would leave the slow path enabled forever,
even after a device driver unload or disable.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvdimm/pmem.c | 23 +++--------------
include/linux/mm.h | 10 --------
kernel/memremap.c | 59 +++++++++++++++++++++++++++---...
2019 Jun 26
1
[PATCH 11/25] memremap: lift the devmap_enable manipulation into devm_memremap_pages
...the
> static key enable, as well as the put using device managed resources.
> Also check that a ->page_free is provided for the pgmaps types that
> require it, and check for a valid type as well while we are at it.
>
> Note that this also fixes the fact that hmm never called
> dev_pagemap_put_ops and thus would leave the slow path enabled forever,
> even after a device driver unload or disable.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> drivers/nvdimm/pmem.c | 23 +++--------------
> include/linux/mm.h | 10 --------
> kernel/memremap.c...
2019 Jun 13
2
[PATCH 09/22] memremap: lift the devmap_enable manipulation into devm_memremap_pages
...; diff --git a/mm/hmm.c b/mm/hmm.c
> index c76a1b5defda..6dc769feb2e1 100644
> +++ b/mm/hmm.c
> @@ -1378,8 +1378,6 @@ struct hmm_devmem *hmm_devmem_add(const struct hmm_devmem_ops *ops,
> void *result;
> int ret;
>
> - dev_pagemap_get_ops();
> -
Where was the matching dev_pagemap_put_ops() for this hmm case? This
is a bug fix too?
The nouveau driver is the only one to actually call this hmm function
and it does it as part of a probe function.
Seems reasonable, however, in the unlikely event that it fails to init
'dmem' the driver will retain a dev_pagemap_get_ops until i...
2019 Jun 17
34
dev_pagemap related cleanups v2
Hi Dan, Jérôme and Jason,
below is a series that cleans up the dev_pagemap interface so that
it is more easily usable, which removes the need to wrap it in hmm
and thus allowing to kill a lot of code
Note: this series is on top of the rdma/hmm branch + the dev_pagemap
releas fix series from Dan that went into 5.2-rc5.
Git tree:
git://git.infradead.org/users/hch/misc.git
2019 Jun 26
41
dev_pagemap related cleanups v3
Hi Dan, Jérôme and Jason,
below is a series that cleans up the dev_pagemap interface so that
it is more easily usable, which removes the need to wrap it in hmm
and thus allowing to kill a lot of code
Note: this series is on top of Linux 5.2-rc5 and has some minor
conflicts with the hmm tree that are easy to resolve.
Diffstat summary:
32 files changed, 361 insertions(+), 1012 deletions(-)
Git
2019 Jun 13
0
[PATCH 07/22] memremap: move dev_pagemap callbacks into a separate structure
....c
@@ -316,7 +316,7 @@ static void pmem_release_queue(void *q)
blk_cleanup_queue(q);
}
-static void pmem_freeze_queue(struct percpu_ref *ref)
+static void pmem_kill(struct percpu_ref *ref)
{
struct request_queue *q;
@@ -339,19 +339,27 @@ static void pmem_release_pgmap_ops(void *__pgmap)
dev_pagemap_put_ops();
}
-static void fsdax_pagefree(struct page *page, void *data)
+static void pmem_fsdax_page_free(struct page *page, void *data)
{
wake_up_var(&page->_refcount);
}
+static const struct dev_pagemap_ops fsdax_pagemap_ops = {
+ .page_free = pmem_fsdax_page_free,
+ .kill = pmem_kill,...
2019 Jun 13
57
dev_pagemap related cleanups
Hi Dan, Jérôme and Jason,
below is a series that cleans up the dev_pagemap interface so that
it is more easily usable, which removes the need to wrap it in hmm
and thus allowing to kill a lot of code
Diffstat:
22 files changed, 245 insertions(+), 802 deletions(-)
Git tree:
git://git.infradead.org/users/hch/misc.git hmm-devmem-cleanup
Gitweb:
2019 Jun 17
0
[PATCH 08/25] memremap: move dev_pagemap callbacks into a separate structure
..._queue(void *ref)
{
- __pmem_release_queue(ref);
+ pmem_pagemap_cleanup(ref);
}
-static void pmem_freeze_queue(struct percpu_ref *ref)
+static void pmem_pagemap_kill(struct percpu_ref *ref)
{
struct request_queue *q;
@@ -347,19 +347,24 @@ static void pmem_release_pgmap_ops(void *__pgmap)
dev_pagemap_put_ops();
}
-static void fsdax_pagefree(struct page *page, void *data)
+static void pmem_pagemap_page_free(struct page *page, void *data)
{
wake_up_var(&page->_refcount);
}
+static const struct dev_pagemap_ops fsdax_pagemap_ops = {
+ .page_free = pmem_pagemap_page_free,
+ .kill = pmem_p...