Re: [PATCH -next v2 4/7] mm: damon: paddr: convert damon_pa_*() to use folios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2022/12/28 3:50, SeongJae Park wrote:
Hi Kefeng,

With damon_get_folio(), let's convert all the damon_pa_*() to use folios.

Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
  mm/damon/paddr.c | 59 +++++++++++++++++++++---------------------------
  1 file changed, 26 insertions(+), 33 deletions(-)

diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 6334c99e5152..728a96c929fc 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -33,17 +33,15 @@ static bool __damon_pa_mkold(struct folio *folio, struct vm_area_struct *vma,
static void damon_pa_mkold(unsigned long paddr)
  {
-	struct folio *folio;
-	struct page *page = damon_get_page(PHYS_PFN(paddr));
+	struct folio *folio = damon_get_folio(PHYS_PFN(paddr));
  	struct rmap_walk_control rwc = {
  		.rmap_one = __damon_pa_mkold,
  		.anon_lock = folio_lock_anon_vma_read,
  	};
  	bool need_lock;
- if (!page)
+	if (!folio)
  		return;
-	folio = page_folio(page);
if (!folio_mapped(folio) || !folio_raw_mapping(folio)) {
  		folio_set_idle(folio);
@@ -58,7 +56,6 @@ static void damon_pa_mkold(unsigned long paddr)
if (need_lock)
  		folio_unlock(folio);
-

Seems unnecessary change?

oh, will drop this change, thanks


Thanks,
SJ




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux