lkml.org 
[lkml]   [2015]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once
On 08/25/2015 09:30 PM, Eric Dumazet wrote:
> On Tue, 2015-08-25 at 21:17 +0530, Raghavendra K T wrote:
>> On 08/25/2015 07:58 PM, Eric Dumazet wrote:
>
>>>
>>>
>>> This is a great idea, but kcalloc()/kmalloc() can fail and you'll crash
>>> the whole kernel at this point.
>>>
>>
>> Good catch, and my bad. Though system is in bad memory condition,
>> since fill_stat is not critical for the system do you think silently
>> returning from here is a good idea?
>> or do you think we should handle with -ENOMEM way up.?
>
> Hmm... presumably these 288 bytes could be allocated in
> inet6_fill_ifla6_attrs() stack frame.
>
> Also it is weird we fill all these stats for a device we just created
> and never enabled : initial stats are all 0 for them.
>

Yes it is.. Initially I was even thinking

1. if we could disable the stat filling just after creation ( only
allocate the space for statistics but do not fill).

2. should we have a PROC_FS_NET_SNMP config which we can disable if not
necessary.

3. should we defer this snmp_fold_walk to a workqueue. (unfortunately
there is not much to do after this stat filling which can run in
parallel before we wait for completion.. or may be there is a way).







\
 
 \ /
  Last update: 2015-08-25 18:21    [W:0.049 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site