Re: [PATCH v1 2/3] megaraid_sas: iouring iopoll support

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

 



On 20/11/2020 07:14, Hannes Reinecke wrote:

      struct rdpq_alloc_detail rdpq_tracker[RDPQ_MAX_CHUNK_COUNT];

The usage of atomic_add_unless() is a bit unusual; one might consider using atomic_test_and_set(). Also it seems to be a bit of a waste using an atomic counter here, seeing that the only values ever used are 0 and 1. But this is largely cosmetic, so:

atomic_add_unless() is generally implemented with a cmpxchg(), which can be inefficient also.

John



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux