linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/khugepaged: use DEFINE_READ_MOSTLY_HASHTABLE macro
@ 2023-06-09 23:44 ndesaulniers
  2023-06-12 21:59 ` Yang Shi
  0 siblings, 1 reply; 2+ messages in thread
From: ndesaulniers @ 2023-06-09 23:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, Nick Desaulniers

These are equivalent, but DEFINE_READ_MOSTLY_HASHTABLE exists to define
a hashtable in the .data..read_mostly section.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 6b9d39d65b73..e7dc49214413 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -88,7 +88,7 @@ static unsigned int khugepaged_max_ptes_swap __read_mostly;
 static unsigned int khugepaged_max_ptes_shared __read_mostly;
 
 #define MM_SLOTS_HASH_BITS 10
-static __read_mostly DEFINE_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
+static DEFINE_READ_MOSTLY_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
 
 static struct kmem_cache *mm_slot_cache __read_mostly;
 

---
base-commit: 64569520920a3ca5d456ddd9f4f95fc6ea9b8b45
change-id: 20230609-khugepage-09ea340b378e

Best regards,
-- 
Nick Desaulniers <ndesaulniers@google.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/khugepaged: use DEFINE_READ_MOSTLY_HASHTABLE macro
  2023-06-09 23:44 [PATCH] mm/khugepaged: use DEFINE_READ_MOSTLY_HASHTABLE macro ndesaulniers
@ 2023-06-12 21:59 ` Yang Shi
  0 siblings, 0 replies; 2+ messages in thread
From: Yang Shi @ 2023-06-12 21:59 UTC (permalink / raw)
  To: ndesaulniers; +Cc: Andrew Morton, linux-mm, linux-kernel

On Fri, Jun 9, 2023 at 4:44 PM <ndesaulniers@google.com> wrote:
>
> These are equivalent, but DEFINE_READ_MOSTLY_HASHTABLE exists to define
> a hashtable in the .data..read_mostly section.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed-by: Yang Shi <shy828301@gmail.com>

> ---
>  mm/khugepaged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 6b9d39d65b73..e7dc49214413 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -88,7 +88,7 @@ static unsigned int khugepaged_max_ptes_swap __read_mostly;
>  static unsigned int khugepaged_max_ptes_shared __read_mostly;
>
>  #define MM_SLOTS_HASH_BITS 10
> -static __read_mostly DEFINE_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
> +static DEFINE_READ_MOSTLY_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
>
>  static struct kmem_cache *mm_slot_cache __read_mostly;
>
>
> ---
> base-commit: 64569520920a3ca5d456ddd9f4f95fc6ea9b8b45
> change-id: 20230609-khugepage-09ea340b378e
>
> Best regards,
> --
> Nick Desaulniers <ndesaulniers@google.com>
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-12 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 23:44 [PATCH] mm/khugepaged: use DEFINE_READ_MOSTLY_HASHTABLE macro ndesaulniers
2023-06-12 21:59 ` Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox