Re: [PATCH] liburing/barrier.h: Add prefix io_uring to barriers

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

 



On 8/12/19 7:55 AM, Bart Van Assche wrote:
> On 8/12/19 5:39 AM, Julia Suvorova wrote:
>> -#define mb()	asm volatile("mfence" ::: "memory")
>> -#define rmb()	asm volatile("lfence" ::: "memory")
>> -#define wmb()	asm volatile("sfence" ::: "memory")
>> -#define smp_rmb() barrier()
>> -#define smp_wmb() barrier()
>> +#define io_uring_mb()		asm volatile("mfence" ::: "memory")
>> +#define io_uring_rmb()		asm volatile("lfence" ::: "memory")
>> +#define io_uring_wmb()		asm volatile("sfence" ::: "memory")
>> +#define io_uring_smp_rmb()	io_uring_barrier()
>> +#define io_uring_smp_wmb()	io_uring_barrier()
> 
> Do users of liburing need these macros? If not, have you considered to
> move these macros to a new header file that is only used inside liburing
> and such that these macros are no longer visible to liburing users?

The exposed API should not need any explicit barriers from the user,
so this suggestion makes a lot of sense to me.

-- 
Jens Axboe




[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