Re: [PATCH] io_uring: save repeated issue_flags

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

 



On 12/5/23 4:02 PM, Keith Busch wrote:
> On Tue, Dec 05, 2023 at 03:00:52PM -0700, Jens Axboe wrote:
>>>  		if (!file->f_op->uring_cmd_iopoll)
>>>  			return -EOPNOTSUPP;
>>> -		issue_flags |= IO_URING_F_IOPOLL;
>>>  		req->iopoll_completed = 0;
>>>  	}
>>>  
>>> +	issue_flags |= ctx->issue_flags;
>>>  	ret = file->f_op->uring_cmd(ioucmd, issue_flags);
>>>  	if (ret == -EAGAIN) {
>>>  		if (!req_has_async_data(req)) {
>>
>> I obviously like this idea, but it should be accompanied by getting rid
>> of ->compat and ->syscall_iopoll in the ctx as well?
> 
> Yeah, I considered that, and can incorporate it here. Below is a snippet
> of what I had earlier to make that happen, but felt the purpose for the
> "issue_flags" was uring_cmd specific and disconnected from everyone
> else. Maybe I'm overthinking it...

I'd just do a patch 2 that does compat and syscall_iopoll. And then if
we ever have a new issue flags (as your other series), then it'd become
natural to add that flag too.

It's not a hard requirement, but it's somewhat ugly to have the same
state in two spots. Which is why I'd prefer if we got rid of the actual
compat/syscall_iopoll members as well, after the conversion is done.

-- 
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