us check the data structure member "sk_shutdown" (suggested by Stefano)
after a call of the function "lock_sock" since this field is set to
"SHUTDOWN_MASK" under the protection of "lock_sock_nested".
Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_co
us check the data structure member “sk_shutdown” (suggested by Stefano)
after a call of the function “lock_sock” since this field is set to
“SHUTDOWN_MASK” under the protection of “lock_sock_nested”.
Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko")
Signed-off-by: Jia He
Cc
This fixes it by checking sk->sk_shutdown(suggested by Stefano) after
lock_sock since sk->sk_shutdown is set to SHUTDOWN_MASK under the
protection of lock_sock_nested.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
Reviewed-by: Stefano Garzarella
---
v3: - describe the fix of race condition mo
If there is __vsock_release() in another task, sk->sk_socket
will be set to NULL inadvertently.
This fixes it by checking sk->sk_shutdown.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
Cc: Stefano Garzarella
---
v2: use lightweight checking suggested by Stefano Garzarell
virtio_transport_recv_connecting
sk->sk_socket->state (panic)
This fixes it by checking vsk again whether it is in bound/connected table.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
---
net/vmw
h vsock enabled) boot time is reduced
from 3s to 1s on a ThunderX2 arm64 server.
[1] https://github.com/kata-containers/runtime/issues/1917
Reported-by: Ning Bo
Suggested-by: Stefano Garzarella
Signed-off-by: Jia He
---
v2: new solution suggested by Stefano Garzarella
drivers/vhost/vsoc
vq->mutex is to protect any vq accessing, hence adding mutex_lock/unlock
makes sense to avoid potential race condition.
Signed-off-by: Jia He
---
drivers/vhost/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index d450e16c5
from
3s to 1s on ThunderX2 arm64 server.
[1] https://github.com/kata-containers/runtime/issues/1917
Reported-by: Ning Bo
Signed-off-by: Jia He
---
drivers/vhost/vsock.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index e36aaf9ba7bd
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 32
net/sctp/proc.c | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/sctp/proc.c b/net/sctp
This is to introduce the generic interfaces for snmp_get_cpu_field{,64}.
It exchanges the two for-loops for collecting the percpu statistics data.
This can aggregate the data by going through all the items of each cpu
sequentially.
Signed-off-by: Jia He
Suggested-by: Marcelo Ricardo Leitner
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_proc.c b
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
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/p
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 30 ++
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/net
The parameter items(is always ICMP6_MIB_MAX) is useless for
__snmp6_fill_statsdev
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2f1f5d4..35d4baa 100644
--- a/net
changes in netstat_seq_show considerred the stack usage is too
large
v3:
- introduce generic interface (suggested by Marcelo Ricardo Leitner)
- use max_t instead of self defined macro (suggested by David Miller)
v2:
- fix bug in udplite statistics.
- snmp_seq_show is split into 2 parts
Jia He (7):
The parameter items(always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev.
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2f1f5d4..35d4baa 100644
--- a/net/ipv6
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/net/xfrm/xfrm_proc.c
This is to introduce the generic interfaces for snmp_get_cpu_field{,64}.
It exchanges the two for-loops for collecting the percpu statistics data.
This can aggregate the data by going through all the items of each cpu
sequentially.
Signed-off-by: Jia He
Suggested-by: Marcelo Ricardo Leitner
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 32 +++-
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/net
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 32
net/sctp/proc.c | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/sctp/proc.c b/net/sctp
netstat_seq_show considerred the stack usage is too
large
v3:
- introduce generic interface (suggested by Marcelo Ricardo Leitner)
- use max_t instead of self defined macro (suggested by David Miller)
v2:
- fix bug in udplite statistics.
- snmp_seq_show is split into 2 parts
Jia He (7):
net:snmp: Introduce
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to
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/p
gested by Marcelo Ricardo Leitner)
- use max_t instead of self defined macro (suggested by David Miller)
v2:
- fix bug in udplite statistics.
- snmp_seq_show is split into 2 parts
Jia He (7):
net:snmp: Introduce generic interfaces for snmp_get_cpu_field{,64}
proc: Reduce cache miss in snmp_seq_show
The parameter items(always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev.
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2f1f5d4..35d4baa 100644
--- a/net/ipv6
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_proc.c b
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/sctp/proc.c b/net/sctp
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 32 +++-
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/net
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 32
net/sctp/proc.c | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git
This is to introduce the generic interfaces for snmp_get_cpu_field{,64}.
It exchanges the two for-loops for collecting the percpu statistics data.
This can aggregate the data by going through all the items of each cpu
sequentially.
Signed-off-by: Jia He
Suggested-by: Marcelo Ricardo Leitner
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
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/p
che
hits[39.89%]
6.868422769 seconds time elapsed
The cache-miss rate can be reduced from 15% to 2.9%
v3:
- introduce generic interface (suggested by Marcelo Ricardo Leitner)
- use max_t instead of self defined macro (suggested by David Miller)
v2:
- fix bug in udplite statistics.
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 32
net/sctp/proc.c | 2 +-
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 32 +++-
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/net
The parameter items(always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev.
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index f418d2e..e170554 100644
--- a/net/ipv6
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Then snmp_seq_show and netstat_seq_show are split into 2 parts to avoid build
warning "the frame size" larger than 1024 on s390.
Signed-off-
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_proc.c b
This is to use the generic interface snmp_get_cpu_field{,64}_batch to
aggregate the data by going through all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/sctp/proc.c b/net/sctp
This is to introduced the generic batch interfaces for snmp_get_cpu_field{,64}.
It exchanges the two for-loops for collecting the percpu statistics data.
This can aggregate the data by going through all the items of each cpu
sequentially.
Signed-off-by: Jia He
Suggested-by: Marcelo Ricardo
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 44 ++--
net/sctp/proc.c | 4 ++--
net/xfrm/xfrm_proc.c | 4 ++--
3 files c
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/net
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
---
The parameter items(always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev.
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index f418d2e..e170554 100644
--- a/net/ipv6
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 47 ---
1 file changed, 36 insertions(+), 11
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git
che
hits[39.89%]
6.868422769 seconds time elapsed
The cache-miss rate can be reduced from 15% to 2.9%
v2:
- 1/6 fix bug in udplite statistics.
- 1/6 snmp_seq_show is split into 2 parts
Jia He (6):
proc: Reduce cache miss in {snmp,netstat}_seq_show
proc: Reduce cache miss in
The parameter items(always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev.
Signed-off-by: Jia He
---
net/ipv6/addrconf.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index df8425f..0fa5aa1 100644
--- a/net/ipv6
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/ipv6/proc.c | 47 ---
1 file changed, 36 insertions(+), 11
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. In snmp_seq_show, just use one buff copy to dislay the
Udp and UdpLite data because they are the same.
Signed-off-by: Jia He
---
net
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/sctp/proc.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/net
[60.04%]
464466 LLC-load-misses #0.25% of all LL-cache
hits[39.89%]
6.868422769 seconds time elapsed
The cache-miss rate can be reduced from 15% to 2.9%
Jia He (6):
proc: Reduce cache miss in {snmp,netstat}_seq_show
proc: Reduce cache miss in
This patch exchanges the two loop for collecting the percpu
statistics data. This can reduce cache misses by going through
all the items of each cpu sequentially.
Signed-off-by: Jia He
---
net/xfrm/xfrm_proc.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git
This is to suppress the checkpatch.pl warning "Comparison to NULL
could be written". No functional changes here.
Signed-off-by: Jia He
---
net/ipv4/proc.c | 42 +-
net/sctp/proc.c | 4 ++--
net/xfrm/xfrm_proc.c | 4 ++--
3 files c
In commit a3a773726c9f ("net: Optimize snmp stat aggregation by walking
all the percpu data at once"), __snmp6_fill_stats64 had been optimized
by removing parameter items, so do the same for __snmp6_fill_statsdev.
Signed-off-by: Jia He
Cc: "David S. Miller"
Cc: Alexey
In PowerPC server with large number cpus, the loop index in smt=1 could be
reduced to 1/8 compared with smt=8.
Thus cache misses can be reduced.
Signed-off-by: Jia He
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
---
This is the follow up work of commit a3a773726c9f ("net: Optimize
snmp stat aggregation by walking all the percpu data at once")
Jia He (3):
net: Remove unnecessary memset in __snmp6_fill_stats64
net: Replace for_each_possible_cpu with for_each_online_cpu
net: Remove the useless
buff[] will be assigned later, so memset is not necessary.
Signed-off-by: Jia He
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
---
net/ipv6/addrconf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ipv6/addrconf.c
58 matches
Mail list logo