All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
@ 2019-04-09 13:01 Konstantin Khlebnikov
  2019-04-09 13:16 ` Vlastimil Babka
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2019-04-09 13:01 UTC (permalink / raw)
  To: linux-mm, Andrew Morton, linux-kernel
  Cc: Roman Gushchin, Vlastimil Babka, Jann Horn

Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
depends on skipping vmstat entries with empty name introduced in commit
7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
nr_indirectly_reclaimable_bytes").

So, skipping no longer works and /proc/vmstat has misformatted lines " 0".
This patch simply shows debug counters "nr_tlb_remote_*" for UP.

Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
 mm/vmstat.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 36b56f858f0f..a7d493366a65 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1274,13 +1274,8 @@ const char * const vmstat_text[] = {
 #endif
 #endif /* CONFIG_MEMORY_BALLOON */
 #ifdef CONFIG_DEBUG_TLBFLUSH
-#ifdef CONFIG_SMP
 	"nr_tlb_remote_flush",
 	"nr_tlb_remote_flush_received",
-#else
-	"", /* nr_tlb_remote_flush */
-	"", /* nr_tlb_remote_flush_received */
-#endif /* CONFIG_SMP */
 	"nr_tlb_local_flush_all",
 	"nr_tlb_local_flush_one",
 #endif /* CONFIG_DEBUG_TLBFLUSH */


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

* Re: [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
  2019-04-09 13:01 [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n Konstantin Khlebnikov
@ 2019-04-09 13:16 ` Vlastimil Babka
  2019-04-09 13:28   ` Konstantin Khlebnikov
  0 siblings, 1 reply; 6+ messages in thread
From: Vlastimil Babka @ 2019-04-09 13:16 UTC (permalink / raw)
  To: Konstantin Khlebnikov, linux-mm, Andrew Morton, linux-kernel
  Cc: Roman Gushchin, Jann Horn

On 4/9/19 3:01 PM, Konstantin Khlebnikov wrote:
> Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
> depends on skipping vmstat entries with empty name introduced in commit
> 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
> but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
> nr_indirectly_reclaimable_bytes").

Oops, good catch.

> So, skipping no longer works and /proc/vmstat has misformatted lines " 0".
> This patch simply shows debug counters "nr_tlb_remote_*" for UP.

Right, that's the the best solution IMHO.

> Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/vmstat.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index 36b56f858f0f..a7d493366a65 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1274,13 +1274,8 @@ const char * const vmstat_text[] = {
>  #endif
>  #endif /* CONFIG_MEMORY_BALLOON */
>  #ifdef CONFIG_DEBUG_TLBFLUSH
> -#ifdef CONFIG_SMP
>  	"nr_tlb_remote_flush",
>  	"nr_tlb_remote_flush_received",
> -#else
> -	"", /* nr_tlb_remote_flush */
> -	"", /* nr_tlb_remote_flush_received */
> -#endif /* CONFIG_SMP */
>  	"nr_tlb_local_flush_all",
>  	"nr_tlb_local_flush_one",
>  #endif /* CONFIG_DEBUG_TLBFLUSH */
> 


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

* Re: [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
  2019-04-09 13:16 ` Vlastimil Babka
@ 2019-04-09 13:28   ` Konstantin Khlebnikov
  2019-04-09 14:43     ` Vlastimil Babka
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Khlebnikov @ 2019-04-09 13:28 UTC (permalink / raw)
  To: Vlastimil Babka, linux-mm, Andrew Morton, linux-kernel
  Cc: Roman Gushchin, Jann Horn

On 09.04.2019 16:16, Vlastimil Babka wrote:
> On 4/9/19 3:01 PM, Konstantin Khlebnikov wrote:
>> Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>> depends on skipping vmstat entries with empty name introduced in commit
>> 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
>> but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
>> nr_indirectly_reclaimable_bytes").
> 
> Oops, good catch.

Also 4.19.y has broken format in /sys/devices/system/node/node*/vmstat and /proc/zoneinfo.
Do you have any plans on pushing related slab changes into that stable branch?

> 
>> So, skipping no longer works and /proc/vmstat has misformatted lines " 0".
>> This patch simply shows debug counters "nr_tlb_remote_*" for UP.
> 
> Right, that's the the best solution IMHO.
> 
>> Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> 
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> 
>> ---
>>   mm/vmstat.c |    5 -----
>>   1 file changed, 5 deletions(-)
>>
>> diff --git a/mm/vmstat.c b/mm/vmstat.c
>> index 36b56f858f0f..a7d493366a65 100644
>> --- a/mm/vmstat.c
>> +++ b/mm/vmstat.c
>> @@ -1274,13 +1274,8 @@ const char * const vmstat_text[] = {
>>   #endif
>>   #endif /* CONFIG_MEMORY_BALLOON */
>>   #ifdef CONFIG_DEBUG_TLBFLUSH
>> -#ifdef CONFIG_SMP
>>   	"nr_tlb_remote_flush",
>>   	"nr_tlb_remote_flush_received",
>> -#else
>> -	"", /* nr_tlb_remote_flush */
>> -	"", /* nr_tlb_remote_flush_received */
>> -#endif /* CONFIG_SMP */
>>   	"nr_tlb_local_flush_all",
>>   	"nr_tlb_local_flush_one",
>>   #endif /* CONFIG_DEBUG_TLBFLUSH */
>>
> 

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

* Re: [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
  2019-04-09 13:28   ` Konstantin Khlebnikov
@ 2019-04-09 14:43     ` Vlastimil Babka
  2019-04-09 15:14       ` Konstantin Khlebnikov
  2019-04-09 19:25       ` Roman Gushchin
  0 siblings, 2 replies; 6+ messages in thread
From: Vlastimil Babka @ 2019-04-09 14:43 UTC (permalink / raw)
  To: Konstantin Khlebnikov, linux-mm, Andrew Morton, linux-kernel
  Cc: Roman Gushchin, Jann Horn

On 4/9/19 3:28 PM, Konstantin Khlebnikov wrote:
> On 09.04.2019 16:16, Vlastimil Babka wrote:
>> On 4/9/19 3:01 PM, Konstantin Khlebnikov wrote:
>>> Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>>> depends on skipping vmstat entries with empty name introduced in commit
>>> 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
>>> but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
>>> nr_indirectly_reclaimable_bytes").
>> 
>> Oops, good catch.
> 
> Also 4.19.y has broken format in /sys/devices/system/node/node*/vmstat and /proc/zoneinfo.
> Do you have any plans on pushing related slab changes into that stable branch?

Hmm do you mean this?
https://lore.kernel.org/linux-mm/20181030174649.16778-1-guro@fb.com/

Looks like Roman marked it wrongly for # 4.14.x-4.18.x and I didn't notice, my
slab changes are indeed 4.20, so we should resend for 4.19.

>> 
>>> So, skipping no longer works and /proc/vmstat has misformatted lines " 0".
>>> This patch simply shows debug counters "nr_tlb_remote_*" for UP.
>> 
>> Right, that's the the best solution IMHO.
>> 
>>> Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>>> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
>> 
>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>> 
>>> ---
>>>   mm/vmstat.c |    5 -----
>>>   1 file changed, 5 deletions(-)
>>>
>>> diff --git a/mm/vmstat.c b/mm/vmstat.c
>>> index 36b56f858f0f..a7d493366a65 100644
>>> --- a/mm/vmstat.c
>>> +++ b/mm/vmstat.c
>>> @@ -1274,13 +1274,8 @@ const char * const vmstat_text[] = {
>>>   #endif
>>>   #endif /* CONFIG_MEMORY_BALLOON */
>>>   #ifdef CONFIG_DEBUG_TLBFLUSH
>>> -#ifdef CONFIG_SMP
>>>   	"nr_tlb_remote_flush",
>>>   	"nr_tlb_remote_flush_received",
>>> -#else
>>> -	"", /* nr_tlb_remote_flush */
>>> -	"", /* nr_tlb_remote_flush_received */
>>> -#endif /* CONFIG_SMP */
>>>   	"nr_tlb_local_flush_all",
>>>   	"nr_tlb_local_flush_one",
>>>   #endif /* CONFIG_DEBUG_TLBFLUSH */
>>>
>> 
> 


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

* Re: [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
  2019-04-09 14:43     ` Vlastimil Babka
@ 2019-04-09 15:14       ` Konstantin Khlebnikov
  2019-04-09 19:25       ` Roman Gushchin
  1 sibling, 0 replies; 6+ messages in thread
From: Konstantin Khlebnikov @ 2019-04-09 15:14 UTC (permalink / raw)
  To: Vlastimil Babka, linux-mm, Andrew Morton, linux-kernel
  Cc: Roman Gushchin, Jann Horn



On 09.04.2019 17:43, Vlastimil Babka wrote:
> On 4/9/19 3:28 PM, Konstantin Khlebnikov wrote:
>> On 09.04.2019 16:16, Vlastimil Babka wrote:
>>> On 4/9/19 3:01 PM, Konstantin Khlebnikov wrote:
>>>> Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>>>> depends on skipping vmstat entries with empty name introduced in commit
>>>> 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
>>>> but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
>>>> nr_indirectly_reclaimable_bytes").
>>>
>>> Oops, good catch.
>>
>> Also 4.19.y has broken format in /sys/devices/system/node/node*/vmstat and /proc/zoneinfo.
>> Do you have any plans on pushing related slab changes into that stable branch?
> 
> Hmm do you mean this?
> https://lore.kernel.org/linux-mm/20181030174649.16778-1-guro@fb.com/
> 
> Looks like Roman marked it wrongly for # 4.14.x-4.18.x and I didn't notice, my
> slab changes are indeed 4.20, so we should resend for 4.19.

Yep, this should fix zoneinfo
but /sys/devices/system/node/node*/vmstat needs yet another fix.

> 
>>>
>>>> So, skipping no longer works and /proc/vmstat has misformatted lines " 0".
>>>> This patch simply shows debug counters "nr_tlb_remote_*" for UP.
>>>
>>> Right, that's the the best solution IMHO.
>>>
>>>> Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
>>>> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
>>>
>>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>>>
>>>> ---
>>>>    mm/vmstat.c |    5 -----
>>>>    1 file changed, 5 deletions(-)
>>>>
>>>> diff --git a/mm/vmstat.c b/mm/vmstat.c
>>>> index 36b56f858f0f..a7d493366a65 100644
>>>> --- a/mm/vmstat.c
>>>> +++ b/mm/vmstat.c
>>>> @@ -1274,13 +1274,8 @@ const char * const vmstat_text[] = {
>>>>    #endif
>>>>    #endif /* CONFIG_MEMORY_BALLOON */
>>>>    #ifdef CONFIG_DEBUG_TLBFLUSH
>>>> -#ifdef CONFIG_SMP
>>>>    	"nr_tlb_remote_flush",
>>>>    	"nr_tlb_remote_flush_received",
>>>> -#else
>>>> -	"", /* nr_tlb_remote_flush */
>>>> -	"", /* nr_tlb_remote_flush_received */
>>>> -#endif /* CONFIG_SMP */
>>>>    	"nr_tlb_local_flush_all",
>>>>    	"nr_tlb_local_flush_one",
>>>>    #endif /* CONFIG_DEBUG_TLBFLUSH */
>>>>
>>>
>>
> 

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

* Re: [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
  2019-04-09 14:43     ` Vlastimil Babka
  2019-04-09 15:14       ` Konstantin Khlebnikov
@ 2019-04-09 19:25       ` Roman Gushchin
  1 sibling, 0 replies; 6+ messages in thread
From: Roman Gushchin @ 2019-04-09 19:25 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Konstantin Khlebnikov, linux-mm, Andrew Morton, linux-kernel, Jann Horn

On Tue, Apr 09, 2019 at 04:43:24PM +0200, Vlastimil Babka wrote:
> On 4/9/19 3:28 PM, Konstantin Khlebnikov wrote:
> > On 09.04.2019 16:16, Vlastimil Babka wrote:
> >> On 4/9/19 3:01 PM, Konstantin Khlebnikov wrote:
> >>> Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
> >>> depends on skipping vmstat entries with empty name introduced in commit
> >>> 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
> >>> but reverted in commit b29940c1abd7 ("mm: rename and change semantics of
> >>> nr_indirectly_reclaimable_bytes").
> >> 
> >> Oops, good catch.
> > 
> > Also 4.19.y has broken format in /sys/devices/system/node/node*/vmstat and /proc/zoneinfo.
> > Do you have any plans on pushing related slab changes into that stable branch?
> 
> Hmm do you mean this?
> https://lore.kernel.org/linux-mm/20181030174649.16778-1-guro@fb.com/
> 
> Looks like Roman marked it wrongly for # 4.14.x-4.18.x and I didn't notice, my
> slab changes are indeed 4.20, so we should resend for 4.19.

Oops, my bad. I believe 4.19 hasn't been released at that time, so I missed it.
Thanks for noticing!

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

end of thread, other threads:[~2019-04-09 19:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 13:01 [PATCH] mm/vmstat: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n Konstantin Khlebnikov
2019-04-09 13:16 ` Vlastimil Babka
2019-04-09 13:28   ` Konstantin Khlebnikov
2019-04-09 14:43     ` Vlastimil Babka
2019-04-09 15:14       ` Konstantin Khlebnikov
2019-04-09 19:25       ` Roman Gushchin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.