From: Gal Pressman <gal.pressman@linux.dev>
To: Tom Sela <tomsela@amazon.com>,
mrgolin@amazon.com, jgg@nvidia.com, leon@kernel.org,
linux-rdma@vger.kernel.org
Cc: sleybo@amazon.com, matua@amazon.com, Yonatan Nachum <ynachum@amazon.com>
Subject: Re: [PATCH for-next] RDMA/efa: Add AH usage counter with sysfs exposure
Date: Thu, 12 Feb 2026 08:52:14 +0200 [thread overview]
Message-ID: <7f42c2e7-25bf-4b20-a464-939aa2552bfd@linux.dev> (raw)
In-Reply-To: <20260211131048.36217-1-tomsela@amazon.com>
On 11/02/2026 15:10, Tom Sela wrote:
> +static int efa_add_ah(struct efa_dev *dev, u16 ah)
> +{
> + unsigned long refcount;
> + void *entry;
> + int err;
> +
> + xa_lock(&dev->ahs_xa);
> + entry = xa_load(&dev->ahs_xa, ah);
> + refcount = entry ? xa_to_value(entry) : 0;
> + if (refcount == 0)
> + atomic64_inc(&dev->ah_count);
What happens to this increment if the store fails?
> +
> + err = xa_err(__xa_store(&dev->ahs_xa, ah, xa_mk_value(refcount + 1), GFP_ATOMIC));
> + xa_unlock(&dev->ahs_xa);
> +
> + return err;
> +}
prev parent reply other threads:[~2026-02-12 6:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 13:10 [PATCH for-next] RDMA/efa: Add AH usage counter with sysfs exposure Tom Sela
2026-02-11 13:13 ` Jason Gunthorpe
2026-02-12 6:52 ` Gal Pressman
2026-02-12 16:36 ` Leon Romanovsky
2026-02-15 13:41 ` Michael Margolin
2026-02-15 17:15 ` Leon Romanovsky
2026-02-15 17:23 ` Gal Pressman
2026-02-15 17:57 ` Leon Romanovsky
2026-02-16 11:08 ` Michael Margolin
2026-02-16 11:22 ` Leon Romanovsky
2026-02-17 14:54 ` Michael Margolin
2026-02-18 0:14 ` Jason Gunthorpe
2026-02-18 9:15 ` Leon Romanovsky
2026-02-18 17:27 ` Michael Margolin
2026-02-16 8:48 ` Michael Margolin
2026-02-16 9:41 ` Leon Romanovsky
2026-02-11 18:48 ` yanjun.zhu
2026-02-12 6:52 ` Gal Pressman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f42c2e7-25bf-4b20-a464-939aa2552bfd@linux.dev \
--to=gal.pressman@linux.dev \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matua@amazon.com \
--cc=mrgolin@amazon.com \
--cc=sleybo@amazon.com \
--cc=tomsela@amazon.com \
--cc=ynachum@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.