lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v7] net/core: Introduce netdev_core_stats_inc()
From

On 2023/10/9 15:53, Eric Dumazet wrote:
> On Mon, Oct 9, 2023 at 5:07 AM Yajun Deng <yajun.deng@linux.dev> wrote:
>
>> 'this_cpu_read + this_cpu_write' and 'pr_info + this_cpu_inc' will make
>> the trace work well.
>>
>> They all have 'pop' instructions in them. This may be the key to making
>> the trace work well.
>>
>> Hi all,
>>
>> I need your help on percpu and ftrace.
>>
> I do not think you made sure netdev_core_stats_inc() was never inlined.
>
> Adding more code in it is simply changing how the compiler decides to
> inline or not.


Yes, you are right. It needs to add the 'noinline' prefix. The
disassembly code will have 'pop'

instruction.

Thanks.

\
 
 \ /
  Last update: 2023-10-09 10:15    [W:0.083 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site