replace sq_mask with ring_mask

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

 



Hello Jens Axboe

Could we replace ctx->sq_mask/ctx->cq_mask with cq_ring->ring_mask
/sq_ring->ring_mask ? because it’s a constant and never change in 
io_uring.c

I found that ctx->sq_mask just used on 

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/io_uring.c?h=v5.1#n1831

and we can replace like follow:

- head = READ_ONCE(ring->array[head & ctx->sq_mask]);
+ head = READ_ONCE(ring->array[head & ring->ring_mask]);

If I understand incorrectly, please point out.

Jackie Liu




[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