Re: liburing: expose syscalls?

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

 



On 2/1/20 2:16 PM, Pavel Begunkov wrote:
> On 01/02/2020 20:52, Jens Axboe wrote:
>> On 2/1/20 10:49 AM, Andres Freund wrote:
>>> Hi, 
>>>
>>> On February 1, 2020 6:39:41 PM GMT+01:00, Jens Axboe <axboe@xxxxxxxxx> wrote:
>>>> On 2/1/20 5:53 AM, Andres Freund wrote:
>>>>> Hi,
>>>>>
>>>>> As long as the syscalls aren't exposed by glibc it'd be useful - at
>>>>> least for me - to have liburing expose the syscalls without really
>>>> going
>>>>> through liburing facilities...
>>>>>
>>>>> Right now I'm e.g. using a "raw"
>>>> io_uring_enter(IORING_ENTER_GETEVENTS)
>>>>> to be able to have multiple processes safely wait for events on the
>>>> same
>>>>> uring, without needing to hold the lock [1] protecting the ring [2]. 
>>>> It's
>>>>> probably a good idea to add a liburing function to be able to do so,
>>>> but
>>>>> I'd guess there are going to continue to be cases like that. In a bit
>>>>> of time it seems likely that at least open source users of uring that
>>>>> are included in databases, have to work against multiple versions of
>>>>> liburing (as usually embedding libs is not allowed), and sometimes
>>>> that
>>>>> is easier if one can backfill a function or two if necessary.
>>>>>
>>>>> That syscall should probably be under a name that won't conflict with
>>>>> eventual glibc implementation of the syscall.
>>>>>
>>>>> Obviously I can just do the syscall() etc myself, but it seems
>>>>> unnecessary to have a separate copy of the ifdefs for syscall numbers
>>>>> etc.
>>>>>
>>>>> What do you think?
>>>>
>>>> Not sure what I'm missing here, but liburing already has
>>>> __sys_io_uring_enter() for this purpose, and ditto for the register
>>>> and setup functions?
>>>
>>> Aren't they hidden to the outside by the symbol versioning script?
>>
>> So you just want to have them exposed? I'd be fine with that. I'll
>> take a patch :-)
>>
> 
> Depends on how it's used, but I'd strive to inline
> __sys_io_uring_enter() to remove the extra indirect call into the
> shared lib. Though, not sure about packaging and all this stuff. May
> be useful to do that for liburing as well.

Not sure that actually matters when you're doing a syscall anyway, that
should be the long pole for the operation.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux