Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326418 > unrolled thread

[PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting

Started byJoonsoo Kim <js1304@gmail.com>
First post2016-02-04 07:00 +0100
Last post2016-02-05 17:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting Joonsoo Kim <js1304@gmail.com> - 2016-02-04 07:00 +0100
    Re: [PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting Christian Borntraeger <borntraeger@de.ibm.com> - 2016-02-04 09:40 +0100
    Re: [PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting David Rientjes <rientjes@google.com> - 2016-02-04 23:20 +0100
      Re: [PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting Joonsoo Kim <js1304@gmail.com> - 2016-02-05 17:20 +0100

#1326418 — [PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting

FromJoonsoo Kim <js1304@gmail.com>
Date2016-02-04 07:00 +0100
Subject[PATCH 1/5] mm/vmalloc: query dynamic DEBUG_PAGEALLOC setting
Message-ID<qYl7s-4t9-5@gated-at.bofh.it>
We can disable debug_pagealloc processing even if the code is complied
with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
whether it is enabled or not in runtime.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 mm/vmalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index fb42a5b..e0e51bd 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -543,10 +543,10 @@ static void vmap_debug_free_range(unsigned long start, unsigned long end)
 	 * debugging doesn't do a broadcast TLB flush so it is a lot
 	 * faster).
 	 */
-#ifdef CONFIG_DEBUG_PAGEALLOC
-	vunmap_page_range(start, end);
-	flush_tlb_kernel_range(start, end);
-#endif
+	if (debug_pagealloc_enabled()) {
+		vunmap_page_range(start, end);
+		flush_tlb_kernel_range(start, end);
+	}
 }
 
 /*
-- 
1.9.1

[toc] | [next] | [standalone]


#1326480

FromChristian Borntraeger <borntraeger@de.ibm.com>
Date2016-02-04 09:40 +0100
Message-ID<qYnCh-69d-5@gated-at.bofh.it>
In reply to#1326418
On 02/04/2016 06:56 AM, Joonsoo Kim wrote:
> We can disable debug_pagealloc processing even if the code is complied
> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
> whether it is enabled or not in runtime.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>


> ---
>  mm/vmalloc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index fb42a5b..e0e51bd 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -543,10 +543,10 @@ static void vmap_debug_free_range(unsigned long start, unsigned long end)
>  	 * debugging doesn't do a broadcast TLB flush so it is a lot
>  	 * faster).
>  	 */
> -#ifdef CONFIG_DEBUG_PAGEALLOC
> -	vunmap_page_range(start, end);
> -	flush_tlb_kernel_range(start, end);
> -#endif
> +	if (debug_pagealloc_enabled()) {
> +		vunmap_page_range(start, end);
> +		flush_tlb_kernel_range(start, end);
> +	}
>  }
> 
>  /*
> 

[toc] | [prev] | [next] | [standalone]


#1327229

FromDavid Rientjes <rientjes@google.com>
Date2016-02-04 23:20 +0100
Message-ID<qYApP-887-9@gated-at.bofh.it>
In reply to#1326418
On Thu, 4 Feb 2016, Joonsoo Kim wrote:

> We can disable debug_pagealloc processing even if the code is complied
> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
> whether it is enabled or not in runtime.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

I think the comment immediately before this code referencing 
CONFIG_DEBUG_PAGEALLOC should be changed to refer to pagealloc debugging 
being enabled.

After that:

	Acked-by: David Rientjes <rientjes@google.com>

[toc] | [prev] | [next] | [standalone]


#1327873

FromJoonsoo Kim <js1304@gmail.com>
Date2016-02-05 17:20 +0100
Message-ID<qYRgZ-2zl-3@gated-at.bofh.it>
In reply to#1327229
2016-02-05 7:18 GMT+09:00 David Rientjes <rientjes@google.com>:
> On Thu, 4 Feb 2016, Joonsoo Kim wrote:
>
>> We can disable debug_pagealloc processing even if the code is complied
>> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
>> whether it is enabled or not in runtime.
>>
>> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> I think the comment immediately before this code referencing
> CONFIG_DEBUG_PAGEALLOC should be changed to refer to pagealloc debugging
> being enabled.

Andrew kindly did it. Thanks, Andrew.

> After that:
>
>         Acked-by: David Rientjes <rientjes@google.com>

Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web