Re: [RFC PATCH v2 1/6] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-06 Thread hejianet
On 9/7/16 6:57 AM, David Miller wrote: From: Jia He Date: Tue, 6 Sep 2016 10:30:04 +0800 +#define MAX(a, b) ((u32)(a) >= (u32)(b) ? (a) : (b)) Thanks B.R. Jia Please do not define private min/max macros, use the existing max_t() or similar as needed.

Re: [RFC PATCH v2 1/6] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-06 Thread David Miller
From: Jia He Date: Tue, 6 Sep 2016 10:30:04 +0800 > +#define MAX(a, b) ((u32)(a) >= (u32)(b) ? (a) : (b)) Please do not define private min/max macros, use the existing max_t() or similar as needed.

[RFC PATCH v2 1/6] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-05 Thread Jia He
This patch exchanges the two loop for collecting the percpu statistics data. This can aggregate the data by going through all the items of each cpu sequentially. Then snmp_seq_show is split into 2 parts to avoid build warning "the frame size" larger than 1024. Signed-off-by: Jia He --- net/ipv4/