Message ID | 1523640309-22024-2-git-send-email-ktraynor@redhat.com |
---|---|
State | Accepted |
Delegated to: | Ian Stokes |
Headers | show |
Series | [ovs-dev,branch,2.9,v3,1/2] netdev-dpdk: Free mempool only when no in-use mbufs. | expand |
On 04/13/2018 06:25 PM, Kevin Traynor wrote: > There is debug when a new mempool is created, but not > when it is reused or freed. Add these as it is very > difficult to debug mempool issues from logs without > them. > Hi Ian, I just sent backports for 2.6/2.7/2.8 branches for the 1/2 patch as it wouldn't apply. This 2/2 will apply cleanly on those branches. Ping me if any issues, Kevin. > Signed-off-by: Kevin Traynor <ktraynor@redhat.com> > --- > lib/netdev-dpdk.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index d8fb222..3cd7c64 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -616,4 +616,5 @@ dpdk_mp_sweep(void) OVS_REQUIRES(dpdk_mp_mutex) > LIST_FOR_EACH_SAFE (dmp, next, list_node, &dpdk_mp_list) { > if (!dmp->refcount && dpdk_mp_full(dmp->mp)) { > + VLOG_DBG("Freeing mempool \"%s\"", dmp->mp->name); > ovs_list_remove(&dmp->list_node); > rte_mempool_free(dmp->mp); > @@ -632,4 +633,5 @@ dpdk_mp_get(int socket_id, int mtu) > LIST_FOR_EACH (dmp, list_node, &dpdk_mp_list) { > if (dmp->socket_id == socket_id && dmp->mtu == mtu) { > + VLOG_DBG("Reusing mempool \"%s\"", dmp->mp->name); > dmp->refcount++; > reuse = true; >
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index d8fb222..3cd7c64 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -616,4 +616,5 @@ dpdk_mp_sweep(void) OVS_REQUIRES(dpdk_mp_mutex) LIST_FOR_EACH_SAFE (dmp, next, list_node, &dpdk_mp_list) { if (!dmp->refcount && dpdk_mp_full(dmp->mp)) { + VLOG_DBG("Freeing mempool \"%s\"", dmp->mp->name); ovs_list_remove(&dmp->list_node); rte_mempool_free(dmp->mp); @@ -632,4 +633,5 @@ dpdk_mp_get(int socket_id, int mtu) LIST_FOR_EACH (dmp, list_node, &dpdk_mp_list) { if (dmp->socket_id == socket_id && dmp->mtu == mtu) { + VLOG_DBG("Reusing mempool \"%s\"", dmp->mp->name); dmp->refcount++; reuse = true;
There is debug when a new mempool is created, but not when it is reused or freed. Add these as it is very difficult to debug mempool issues from logs without them. Signed-off-by: Kevin Traynor <ktraynor@redhat.com> --- lib/netdev-dpdk.c | 2 ++ 1 file changed, 2 insertions(+)