Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2021 09:47:05 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ad9671955a40 - stable/13 - ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line
Message-ID:  <202108180947.17I9l5mW078090@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=ad9671955a40ed69432e66d4ff6579c42a6e048d

commit ad9671955a40ed69432e66d4ff6579c42a6e048d
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-08-13 09:29:57 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-08-18 09:44:43 +0000

    ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line
    
    The keyword adds nothing as all operations on the var are performed
    through atomic_*
    
    Reviewed by:    kp
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D31526
    
    (cherry picked from commit d2b95af1c27ed51d72bef5d9f3d89860edc4fd40)
---
 sys/netinet/ip_reass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c
index f5cc6ad68125..8a071345677a 100644
--- a/sys/netinet/ip_reass.c
+++ b/sys/netinet/ip_reass.c
@@ -137,12 +137,12 @@ ipq_drop(struct ipqbucket *bucket, struct ipq *fp)
 #define	IP_MAXFRAGPACKETS	(imin(IP_MAXFRAGS, IPREASS_NHASH * 50))
 
 static int		maxfrags;
-static volatile u_int	nfrags;
+static u_int __exclusive_cache_line	nfrags;
 SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfrags, CTLFLAG_RW,
     &maxfrags, 0,
     "Maximum number of IPv4 fragments allowed across all reassembly queues");
 SYSCTL_UINT(_net_inet_ip, OID_AUTO, curfrags, CTLFLAG_RD,
-    __DEVOLATILE(u_int *, &nfrags), 0,
+    &nfrags, 0,
     "Current number of IPv4 fragments across all reassembly queues");
 
 VNET_DEFINE_STATIC(uma_zone_t, ipq_zone);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108180947.17I9l5mW078090>