Re: [PATCH 3/3] rust: xarray: add `insert` and `reserve`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, this is on my todo list.

Again, thanks Tamir for working on this.

> On 1 Jul 2025, at 14:04, Tamir Duberstein <tamird@xxxxxxxxx> wrote:
> 
> On Tue, Jul 1, 2025 at 12:56 PM Miguel Ojeda
> <miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>> 
>> On Tue, Jul 1, 2025 at 6:27 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>>> 
>>> Add `Guard::{insert,reserve}` and `Guard::{insert,reserve}_limit`, which
>>> are akin to `__xa_{alloc,insert}` in C.
>> 
>> Who will be using this? i.e. we need to justify adding code, typically
>> by mentioning the users.
> 
> Daniel, could you name your use case?

My main use case is for insert_limit.

Tyr uses xarrays to keep track of resources allocated by userspace, and we need
to impose limits on how many resources can be allocated at once.

insert_limits() provides the exact semantics needed, i.e.: insert somewhere in
the array as long as there is vacant space in the given range.

— Daniel




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux