Thread (56 messages) flat view 56 messages, 6 authors, 2019-08-27

Re: [PATCH 08/38] nfp: Convert to XArray

From: Jakub Kicinski <hidden>
Date: 2019-08-21 03:59:24

On Tue, 20 Aug 2019 15:32:29 -0700, Matthew Wilcox wrote:
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

A minor change in semantics where we simply store into the XArray rather
than insert; this only matters if there could already be something stored
at that index, and from my reading of the code that can't happen.

Use xa_for_each() rather than xas_for_each() as none of these loops
appear to be performance-critical.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Looks reasonable (indeed IIRC there should not be anything at the
index we try to store to). I'll try to test tomorrow (CCing maintainers
could speed things up a little.. 🤭)
quoted hunk ↗ jump to hunk
@@ -285,9 +275,9 @@ static void
 nfp_abm_qdisc_clear_mq(struct net_device *netdev, struct nfp_abm_link *alink,
 		       struct nfp_qdisc *qdisc)
 {
-	struct radix_tree_iter iter;
 	unsigned int mq_refs = 0;
-	void __rcu **slot;
+	unsigned long index;
+	struct nfp_qdisc *mq;
Could you keep the variables sorted longest to shortest as is customary
in networking code if you respin?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help