Re: [PATCH RFC 2/2] net: Optimize snmp stat aggregation by walking all the percpu data at once
From: Raghavendra K T
Date: Wed Aug 26 2015 - 07:07:54 EST
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.
Correct, since we need to allocate for IPSTATS_MIB_MAX, we could do
this in even snmp6_fill_stats() stack frame.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/