netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: revert lib/percpu_counter API for fragmentation mem accounting
@ 2017-09-01  9:26 Jesper Dangaard Brouer
  2017-09-01  9:26 ` [PATCH net 1/2] Revert "net: use lib/percpu_counter API for fragmentation mem accounting" Jesper Dangaard Brouer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jesper Dangaard Brouer @ 2017-09-01  9:26 UTC (permalink / raw)
  To: netdev; +Cc: mkubecek, Florian Westphal, liujian56, Jesper Dangaard Brouer

There is a bug in fragmentation codes use of the percpu_counter API,
that can cause issues on systems with many CPUs, above 24 CPUs.

After much consideration and different attempts at solving the API
usage.  The conclusion is to revert to the simple atomic_t API instead.

The ratio between batch size and threshold size make it a bad use-case
for the lib/percpu_counter API.  As using the correct API calls will
unfortunately cause systems with many CPUs to always execute an
expensive sum across all CPUs. Plus the added complexity is not worth it.

---

Jesper Dangaard Brouer (2):
      Revert "net: use lib/percpu_counter API for fragmentation mem accounting"
      Revert "net: fix percpu memory leaks"


 include/net/inet_frag.h                 |   35 ++++++++-----------------------
 net/ieee802154/6lowpan/reassembly.c     |   11 +++-------
 net/ipv4/inet_fragment.c                |    4 +---
 net/ipv4/ip_fragment.c                  |   12 +++--------
 net/ipv6/netfilter/nf_conntrack_reasm.c |   12 +++--------
 net/ipv6/reassembly.c                   |   12 +++--------
 6 files changed, 22 insertions(+), 64 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-03 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-01  9:26 [PATCH net 0/2] net: revert lib/percpu_counter API for fragmentation mem accounting Jesper Dangaard Brouer
2017-09-01  9:26 ` [PATCH net 1/2] Revert "net: use lib/percpu_counter API for fragmentation mem accounting" Jesper Dangaard Brouer
2017-09-01  9:30   ` Florian Westphal
2017-09-01  9:26 ` [PATCH net 2/2] Revert "net: fix percpu memory leaks" Jesper Dangaard Brouer
2017-09-03 18:01 ` [PATCH net 0/2] net: revert lib/percpu_counter API for fragmentation mem accounting David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).