Message ID | 20220815130911.988014-2-dylany@fb.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | io_uring: defer task work to when it is needed | expand |
On 8/15/22 14:09, Dylan Yudaken wrote: > small change to use the local ctx > > Signed-off-by: Dylan Yudaken <dylany@fb.com> > --- > io_uring/io_uring.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > index ebfdb2212ec2..ab3e3d9e9fcd 100644 > --- a/io_uring/io_uring.c > +++ b/io_uring/io_uring.c > @@ -1072,8 +1072,8 @@ void io_req_task_work_add(struct io_kiocb *req) > req = container_of(node, struct io_kiocb, io_task_work.node); > node = node->next; > if (llist_add(&req->io_task_work.node, > - &req->ctx->fallback_llist)) > - schedule_delayed_work(&req->ctx->fallback_work, 1); > + &ctx->fallback_llist)) > + schedule_delayed_work(&ctx->fallback_work, 1); Requests here can be from different rings, you can't use @ctx from above
On Mon, 2022-08-15 at 14:46 +0100, Pavel Begunkov wrote: > On 8/15/22 14:09, Dylan Yudaken wrote: > > small change to use the local ctx > > > > Signed-off-by: Dylan Yudaken <dylany@fb.com> > > --- > > io_uring/io_uring.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > > index ebfdb2212ec2..ab3e3d9e9fcd 100644 > > --- a/io_uring/io_uring.c > > +++ b/io_uring/io_uring.c > > @@ -1072,8 +1072,8 @@ void io_req_task_work_add(struct io_kiocb > > *req) > > req = container_of(node, struct io_kiocb, > > io_task_work.node); > > node = node->next; > > if (llist_add(&req->io_task_work.node, > > - &req->ctx->fallback_llist)) > > - schedule_delayed_work(&req->ctx- > > >fallback_work, 1); > > + &ctx->fallback_llist)) > > + schedule_delayed_work(&ctx->fallback_work, > > 1); > > Requests here can be from different rings, you can't use @ctx > from above > Ah - thats a completely miss by me. I'll remove this patch from the series.
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index ebfdb2212ec2..ab3e3d9e9fcd 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1072,8 +1072,8 @@ void io_req_task_work_add(struct io_kiocb *req) req = container_of(node, struct io_kiocb, io_task_work.node); node = node->next; if (llist_add(&req->io_task_work.node, - &req->ctx->fallback_llist)) - schedule_delayed_work(&req->ctx->fallback_work, 1); + &ctx->fallback_llist)) + schedule_delayed_work(&ctx->fallback_work, 1); } }
small change to use the local ctx Signed-off-by: Dylan Yudaken <dylany@fb.com> --- io_uring/io_uring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)