diff mbox series

ring-buffer: remove obsolete comment for free_buffer_page()

Message ID 20230315142446.27040-1-vbabka@suse.cz (mailing list archive)
State Accepted
Commit a98151ad53b53f010ee364ec2fd06445b328578b
Headers show
Series ring-buffer: remove obsolete comment for free_buffer_page() | expand

Commit Message

Vlastimil Babka March 15, 2023, 2:24 p.m. UTC
The comment refers to mm/slob.o which is being removed. It comes from
commit ed56829cb319 ("ring_buffer: reset buffer page when freeing") and
according to Steven the borrowed code was a page mapcount and mapping
reset, which was later removed by commit e4c2ce82ca27 ("ring_buffer:
allocate buffer page pointer"). Thus the comment is not accurate anyway,
remove it.

Reported-by: Mike Rapoport <mike.rapoport@gmail.com>
Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Fixes: e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer")
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 kernel/trace/ring_buffer.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Mukesh Ojha March 15, 2023, 3:51 p.m. UTC | #1
On 3/15/2023 7:54 PM, Vlastimil Babka wrote:
> The comment refers to mm/slob.o which is being removed. It comes from


> commit ed56829cb319 ("ring_buffer: reset buffer page when freeing") and
> according to Steven the borrowed code was a page mapcount and mapping
> reset, which was later removed by commit e4c2ce82ca27 ("ring_buffer:
> allocate buffer page pointer"). Thus the comment is not accurate anyway,
> remove it.
> 
> Reported-by: Mike Rapoport <mike.rapoport@gmail.com>
> Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> Fixes: e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
>   kernel/trace/ring_buffer.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index af50d931b020..c6f47b6cfd5f 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -354,10 +354,6 @@ static void rb_init_page(struct buffer_data_page *bpage)
>   	local_set(&bpage->commit, 0);
>   }
>   
> -/*
> - * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing
> - * this issue out.
> - */

Thanks for the clean up.

Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

-- Mukesh

>   static void free_buffer_page(struct buffer_page *bpage)
>   {
>   	free_page((unsigned long)bpage->page);
Mukesh Ojha March 15, 2023, 3:53 p.m. UTC | #2
On 3/15/2023 9:21 PM, Mukesh Ojha wrote:
> 
> 
> On 3/15/2023 7:54 PM, Vlastimil Babka wrote:
>> The comment refers to mm/slob.o which is being removed. It comes from

nit: mm/slob.c

-- Mukesh

> 
> 
>> commit ed56829cb319 ("ring_buffer: reset buffer page when freeing") and
>> according to Steven the borrowed code was a page mapcount and mapping
>> reset, which was later removed by commit e4c2ce82ca27 ("ring_buffer:
>> allocate buffer page pointer"). Thus the comment is not accurate anyway,
>> remove it.
>>
>> Reported-by: Mike Rapoport <mike.rapoport@gmail.com>
>> Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>> Fixes: e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer")
>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
>> ---
>>   kernel/trace/ring_buffer.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
>> index af50d931b020..c6f47b6cfd5f 100644
>> --- a/kernel/trace/ring_buffer.c
>> +++ b/kernel/trace/ring_buffer.c
>> @@ -354,10 +354,6 @@ static void rb_init_page(struct buffer_data_page 
>> *bpage)
>>       local_set(&bpage->commit, 0);
>>   }
>> -/*
>> - * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing
>> - * this issue out.
>> - */
> 
> Thanks for the clean up.
> 
> Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
> 
> -- Mukesh
> 
>>   static void free_buffer_page(struct buffer_page *bpage)
>>   {
>>       free_page((unsigned long)bpage->page);
Vlastimil Babka March 16, 2023, 8:29 a.m. UTC | #3
On 3/15/23 16:53, Mukesh Ojha wrote:
> 
> 
> On 3/15/2023 9:21 PM, Mukesh Ojha wrote:
>> 
>> 
>> On 3/15/2023 7:54 PM, Vlastimil Babka wrote:
>>> The comment refers to mm/slob.o which is being removed. It comes from
> 
> nit: mm/slob.c

Thanks, Steven can you fix that up while picking the patch, or need v2?

> -- Mukesh
> 
>> 
>> 
>>> commit ed56829cb319 ("ring_buffer: reset buffer page when freeing") and
>>> according to Steven the borrowed code was a page mapcount and mapping
>>> reset, which was later removed by commit e4c2ce82ca27 ("ring_buffer:
>>> allocate buffer page pointer"). Thus the comment is not accurate anyway,
>>> remove it.
>>>
>>> Reported-by: Mike Rapoport <mike.rapoport@gmail.com>
>>> Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>>> Fixes: e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer")
>>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
>>> ---
>>>   kernel/trace/ring_buffer.c | 4 ----
>>>   1 file changed, 4 deletions(-)
>>>
>>> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
>>> index af50d931b020..c6f47b6cfd5f 100644
>>> --- a/kernel/trace/ring_buffer.c
>>> +++ b/kernel/trace/ring_buffer.c
>>> @@ -354,10 +354,6 @@ static void rb_init_page(struct buffer_data_page 
>>> *bpage)
>>>       local_set(&bpage->commit, 0);
>>>   }
>>> -/*
>>> - * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing
>>> - * this issue out.
>>> - */
>> 
>> Thanks for the clean up.
>> 
>> Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

Thanks.

>> 
>> -- Mukesh
>> 
>>>   static void free_buffer_page(struct buffer_page *bpage)
>>>   {
>>>       free_page((unsigned long)bpage->page);
Steven Rostedt March 16, 2023, 1:57 p.m. UTC | #4
On Thu, 16 Mar 2023 09:29:30 +0100
Vlastimil Babka <vbabka@suse.cz> wrote:

> On 3/15/23 16:53, Mukesh Ojha wrote:
> > 
> > 
> > On 3/15/2023 9:21 PM, Mukesh Ojha wrote:  
> >> 
> >> 
> >> On 3/15/2023 7:54 PM, Vlastimil Babka wrote:  
> >>> The comment refers to mm/slob.o which is being removed. It comes from  
> > 
> > nit: mm/slob.c  
> 
> Thanks, Steven can you fix that up while picking the patch, or need v2?

I'll fix it up.

-- Steve
diff mbox series

Patch

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index af50d931b020..c6f47b6cfd5f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -354,10 +354,6 @@  static void rb_init_page(struct buffer_data_page *bpage)
 	local_set(&bpage->commit, 0);
 }
 
-/*
- * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing
- * this issue out.
- */
 static void free_buffer_page(struct buffer_page *bpage)
 {
 	free_page((unsigned long)bpage->page);