From: Matthew Wilcox <willy@infradead.org>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/3] ida: Introduce ida_weight()
Date: Thu, 2 Nov 2023 17:46:16 +0000 [thread overview]
Message-ID: <ZUPgaAN71ERvQ5/F@casper.infradead.org> (raw)
In-Reply-To: <20231102153455.1252-2-michal.wajdeczko@intel.com>
On Thu, Nov 02, 2023 at 04:34:53PM +0100, Michal Wajdeczko wrote:
> Add helper function that will calculate number of allocated IDs
> in the IDA. This might be helpful both for drivers to estimate
> saturation of used IDs and for testing the IDA implementation.
Since you take & release the lock, the value is already somewhat racy.
So why use the lock at all? Wouldn't the RCU read lock be a better
approach?
Also, does it make sense to specify it over a particular range rather
than over the whole IDA?
next prev parent reply other threads:[~2023-11-02 17:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 15:34 [PATCH 0/3] ida: Allow allocations of contiguous IDs Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 1/3] ida: Introduce ida_weight() Michal Wajdeczko
2023-11-02 17:46 ` Matthew Wilcox [this message]
2023-11-02 19:05 ` Michal Wajdeczko
2024-01-09 20:52 ` Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 2/3] ida: Introduce ida_alloc_group_range() Michal Wajdeczko
2024-01-09 20:58 ` Michal Wajdeczko
2023-11-02 15:34 ` [PATCH 3/3] ida: Add kunit based tests for new IDA functions Michal Wajdeczko
2023-11-02 17:43 ` Matthew Wilcox
2023-11-02 18:58 ` Michal Wajdeczko
2023-11-02 19:12 ` Matthew Wilcox
2023-11-02 20:58 ` Michal Wajdeczko
2023-11-02 21:01 ` Matthew Wilcox
2023-11-02 21:33 ` Michal Wajdeczko
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=ZUPgaAN71ERvQ5/F@casper.infradead.org \
--to=willy@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=michal.wajdeczko@intel.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 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).