Re: [PATCH] mm/vmemmap/devdax: Fix kernel crash when probing devdax devices

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

 



On 4/7/2023 5:23 AM, Aneesh Kumar K.V wrote:
diff --git a/mm/Kconfig b/mm/Kconfig
index ff7b209dec05..99f87c1be1e8 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -461,6 +461,9 @@ config SPARSEMEM_VMEMMAP
  	  pfn_to_page and page_to_pfn operations.  This is the most
  	  efficient option when sufficient kernel resources are available.
+config ARCH_WANT_OPTIMIZE_VMEMMAP
+	bool
+

Could this devdax specific config switch be added to drivers/dax/Kconfig ? also, how about adding 'DAX' to the config switch name?

BTW, I noticed something minor and unrelated in the original commit (c4386bd8ee3a):

-static unsigned long pfn_next(unsigned long pfn)
+static unsigned long pfn_next(struct dev_pagemap *pgmap, unsigned long pfn)
 {
-       if (pfn % 1024 == 0)
+       if (pfn % (1024 << pgmap->vmemmap_shift))     <---- this line
                cond_resched();
-       return pfn + 1;
+       return pfn + pgmap_vmemmap_nr(pgmap);
+}

should be
+       if (pfn % (1024 * pgmap_vmemmap_nr(pgmap))
to be consistent.

thanks,
-jane





[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