IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: William Dauchy <wdauchy@gmail.com>
Cc: io-uring@vger.kernel.org
Subject: Re: SQPOLL behaviour with openat
Date: Sat, 4 Jan 2020 10:41:20 -0700
Message-ID: <587a53c3-5a7e-e8fa-d7d4-9bc33e0ec8ce@kernel.dk> (raw)
In-Reply-To: <CAJ75kXZdwF4x0Od9BE5OD0vxbkuKR2UDHSfjaQ-yhjUkpx=r2A@mail.gmail.com>

On 1/4/20 9:41 AM, William Dauchy wrote:
> Hello Jens,
> 
> Thank you for the quick answer.
> 
> On Sat, Jan 4, 2020 at 5:28 PM Jens Axboe <axboe@kernel.dk> wrote:
>> sqpoll requires the use of fixed files for any sqe, at least for now.
>> That's why it returns -EBADF if the request doesn't have fixed files
>> specified.
> 
>  I indeed forgot sqe->flags |= IOSQE_FIXED_FILE; in my modified test.
> 
>> So it cannot be used with opcodes that create (or close) file
>> descriptors either.
> 
> ok, I thought `dirfd` could have been the index of my registered fd
> for `openat` call. It was not very clear to me this was not possible
> to use fixed files for those opcodes.

I should probably clarify that in the man pages! I'll get that done.
But yes, that it is how it _should_ work for registered files. I haven't
spent too much time on sqpoll lately, but there's really no reason why
it cannot do everything that the regular path can. Just need to ensure
the proper inheritance is done, it's a kernel thread just like the async
workers.

-- 
Jens Axboe


      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 16:22 wdauchy
2020-01-04 16:28 ` Jens Axboe
2020-01-04 16:41   ` William Dauchy
2020-01-04 17:41     ` Jens Axboe [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=587a53c3-5a7e-e8fa-d7d4-9bc33e0ec8ce@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=wdauchy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git