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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux