LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kmemleak: Report if we need to tune KMEMLEAK_EARLY_LOG_SIZE
@ 2018-04-24 15:51 Jan Kiszka
  2018-04-24 15:55 ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2018-04-24 15:51 UTC (permalink / raw)
  To: Catalin Marinas, linux-mm, Linux Kernel Mailing List

...rather than just mysteriously disabling it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 mm/kmemleak.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 9a085d525bbc..156c0c69cc5c 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -863,6 +863,7 @@ static void __init log_early(int op_type, const void *ptr, size_t size,
 
 	if (crt_early_log >= ARRAY_SIZE(early_log)) {
 		crt_early_log++;
+		pr_warn("Too many early logs\n");
 		kmemleak_disable();
 		return;
 	}
-- 
2.13.6

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

* Re: [PATCH] kmemleak: Report if we need to tune KMEMLEAK_EARLY_LOG_SIZE
  2018-04-24 15:51 [PATCH] kmemleak: Report if we need to tune KMEMLEAK_EARLY_LOG_SIZE Jan Kiszka
@ 2018-04-24 15:55 ` Catalin Marinas
  2018-04-24 16:10   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2018-04-24 15:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: linux-mm, Linux Kernel Mailing List

On Tue, Apr 24, 2018 at 05:51:15PM +0200, Jan Kiszka wrote:
> ...rather than just mysteriously disabling it.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  mm/kmemleak.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index 9a085d525bbc..156c0c69cc5c 100644
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -863,6 +863,7 @@ static void __init log_early(int op_type, const void *ptr, size_t size,
>  
>  	if (crt_early_log >= ARRAY_SIZE(early_log)) {
>  		crt_early_log++;
> +		pr_warn("Too many early logs\n");

That's already printed, though later where we have an idea of how big the early
log needs to be:

	if (crt_early_log > ARRAY_SIZE(early_log))
		pr_warn("Early log buffer exceeded (%d), please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE\n",
			crt_early_log);

-- 
Catalin

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

* Re: [PATCH] kmemleak: Report if we need to tune KMEMLEAK_EARLY_LOG_SIZE
  2018-04-24 15:55 ` Catalin Marinas
@ 2018-04-24 16:10   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2018-04-24 16:10 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: linux-mm, Linux Kernel Mailing List

On 2018-04-24 17:55, Catalin Marinas wrote:
> On Tue, Apr 24, 2018 at 05:51:15PM +0200, Jan Kiszka wrote:
>> ...rather than just mysteriously disabling it.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  mm/kmemleak.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
>> index 9a085d525bbc..156c0c69cc5c 100644
>> --- a/mm/kmemleak.c
>> +++ b/mm/kmemleak.c
>> @@ -863,6 +863,7 @@ static void __init log_early(int op_type, const void *ptr, size_t size,
>>  
>>  	if (crt_early_log >= ARRAY_SIZE(early_log)) {
>>  		crt_early_log++;
>> +		pr_warn("Too many early logs\n");
> 
> That's already printed, though later where we have an idea of how big the early
> log needs to be:
> 
> 	if (crt_early_log > ARRAY_SIZE(early_log))
> 		pr_warn("Early log buffer exceeded (%d), please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE\n",
> 			crt_early_log);
> 

Well, that's good, but where you read "detector disabled", there is no
hint on that. I missed that because subsystems tend to not do any
further actions after telling they are off.

BTW, my system (virtual ARM64 target) required 26035 entries, which is a
few orders of magnitude above the default and pretty close the the
limit. What's causing this? Other debug options?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

end of thread, other threads:[~2018-04-24 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 15:51 [PATCH] kmemleak: Report if we need to tune KMEMLEAK_EARLY_LOG_SIZE Jan Kiszka
2018-04-24 15:55 ` Catalin Marinas
2018-04-24 16:10   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).