* [PATCH 1/1] io_uring: kill fasync
@ 2021-10-01 9:39 Pavel Begunkov
2021-10-01 14:07 ` Pavel Begunkov
2021-10-01 17:16 ` Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Pavel Begunkov @ 2021-10-01 9:39 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: asml.silence
We have never supported fasync properly, it would only fire when there
is something polling io_uring making it useless. Get rid of fasync bits.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index c6a82c67a93d..f76a9b6bed2c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -398,7 +398,6 @@ struct io_ring_ctx {
struct wait_queue_head cq_wait;
unsigned cq_extra;
atomic_t cq_timeouts;
- struct fasync_struct *cq_fasync;
unsigned cq_last_tm_flush;
} ____cacheline_aligned_in_smp;
@@ -1614,10 +1613,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
wake_up(&ctx->sq_data->wait);
if (io_should_trigger_evfd(ctx))
eventfd_signal(ctx->cq_ev_fd, 1);
- if (waitqueue_active(&ctx->poll_wait)) {
+ if (waitqueue_active(&ctx->poll_wait))
wake_up_interruptible(&ctx->poll_wait);
- kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
- }
}
static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
@@ -1631,10 +1628,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
}
if (io_should_trigger_evfd(ctx))
eventfd_signal(ctx->cq_ev_fd, 1);
- if (waitqueue_active(&ctx->poll_wait)) {
+ if (waitqueue_active(&ctx->poll_wait))
wake_up_interruptible(&ctx->poll_wait);
- kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
- }
}
/* Returns true if there are no backlogged entries after the flush */
@@ -9304,13 +9299,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
return mask;
}
-static int io_uring_fasync(int fd, struct file *file, int on)
-{
- struct io_ring_ctx *ctx = file->private_data;
-
- return fasync_helper(fd, file, on, &ctx->cq_fasync);
-}
-
static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
{
const struct cred *creds;
@@ -10155,7 +10143,6 @@ static const struct file_operations io_uring_fops = {
.mmap_capabilities = io_uring_nommu_mmap_capabilities,
#endif
.poll = io_uring_poll,
- .fasync = io_uring_fasync,
#ifdef CONFIG_PROC_FS
.show_fdinfo = io_uring_show_fdinfo,
#endif
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] io_uring: kill fasync
2021-10-01 9:39 [PATCH 1/1] io_uring: kill fasync Pavel Begunkov
@ 2021-10-01 14:07 ` Pavel Begunkov
2021-10-01 14:17 ` Pavel Begunkov
2021-10-01 17:16 ` Jens Axboe
1 sibling, 1 reply; 4+ messages in thread
From: Pavel Begunkov @ 2021-10-01 14:07 UTC (permalink / raw)
To: Jens Axboe, io-uring
On 10/1/21 10:39 AM, Pavel Begunkov wrote:
> We have never supported fasync properly, it would only fire when there
> is something polling io_uring making it useless. Get rid of fasync bits.
Actually, it looks there is something screwed, let's hold on this
> Signed-off-by: Pavel Begunkov <[email protected]>
> ---
> fs/io_uring.c | 17 ++---------------
> 1 file changed, 2 insertions(+), 15 deletions(-)
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index c6a82c67a93d..f76a9b6bed2c 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -398,7 +398,6 @@ struct io_ring_ctx {
> struct wait_queue_head cq_wait;
> unsigned cq_extra;
> atomic_t cq_timeouts;
> - struct fasync_struct *cq_fasync;
> unsigned cq_last_tm_flush;
> } ____cacheline_aligned_in_smp;
>
> @@ -1614,10 +1613,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
> wake_up(&ctx->sq_data->wait);
> if (io_should_trigger_evfd(ctx))
> eventfd_signal(ctx->cq_ev_fd, 1);
> - if (waitqueue_active(&ctx->poll_wait)) {
> + if (waitqueue_active(&ctx->poll_wait))
> wake_up_interruptible(&ctx->poll_wait);
> - kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
> - }
> }
>
> static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
> @@ -1631,10 +1628,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
> }
> if (io_should_trigger_evfd(ctx))
> eventfd_signal(ctx->cq_ev_fd, 1);
> - if (waitqueue_active(&ctx->poll_wait)) {
> + if (waitqueue_active(&ctx->poll_wait))
> wake_up_interruptible(&ctx->poll_wait);
> - kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
> - }
> }
>
> /* Returns true if there are no backlogged entries after the flush */
> @@ -9304,13 +9299,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
> return mask;
> }
>
> -static int io_uring_fasync(int fd, struct file *file, int on)
> -{
> - struct io_ring_ctx *ctx = file->private_data;
> -
> - return fasync_helper(fd, file, on, &ctx->cq_fasync);
> -}
> -
> static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
> {
> const struct cred *creds;
> @@ -10155,7 +10143,6 @@ static const struct file_operations io_uring_fops = {
> .mmap_capabilities = io_uring_nommu_mmap_capabilities,
> #endif
> .poll = io_uring_poll,
> - .fasync = io_uring_fasync,
> #ifdef CONFIG_PROC_FS
> .show_fdinfo = io_uring_show_fdinfo,
> #endif
>
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] io_uring: kill fasync
2021-10-01 14:07 ` Pavel Begunkov
@ 2021-10-01 14:17 ` Pavel Begunkov
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Begunkov @ 2021-10-01 14:17 UTC (permalink / raw)
To: Jens Axboe, io-uring
On 10/1/21 3:07 PM, Pavel Begunkov wrote:
> On 10/1/21 10:39 AM, Pavel Begunkov wrote:
>> We have never supported fasync properly, it would only fire when there
>> is something polling io_uring making it useless. Get rid of fasync bits.
>
> Actually, it looks there is something screwed, let's hold on this
My bad, failed because of unrelated change, this one is good to go
>
>
>> Signed-off-by: Pavel Begunkov <[email protected]>
>> ---
>> fs/io_uring.c | 17 ++---------------
>> 1 file changed, 2 insertions(+), 15 deletions(-)
>>
>> diff --git a/fs/io_uring.c b/fs/io_uring.c
>> index c6a82c67a93d..f76a9b6bed2c 100644
>> --- a/fs/io_uring.c
>> +++ b/fs/io_uring.c
>> @@ -398,7 +398,6 @@ struct io_ring_ctx {
>> struct wait_queue_head cq_wait;
>> unsigned cq_extra;
>> atomic_t cq_timeouts;
>> - struct fasync_struct *cq_fasync;
>> unsigned cq_last_tm_flush;
>> } ____cacheline_aligned_in_smp;
>>
>> @@ -1614,10 +1613,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
>> wake_up(&ctx->sq_data->wait);
>> if (io_should_trigger_evfd(ctx))
>> eventfd_signal(ctx->cq_ev_fd, 1);
>> - if (waitqueue_active(&ctx->poll_wait)) {
>> + if (waitqueue_active(&ctx->poll_wait))
>> wake_up_interruptible(&ctx->poll_wait);
>> - kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
>> - }
>> }
>>
>> static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
>> @@ -1631,10 +1628,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
>> }
>> if (io_should_trigger_evfd(ctx))
>> eventfd_signal(ctx->cq_ev_fd, 1);
>> - if (waitqueue_active(&ctx->poll_wait)) {
>> + if (waitqueue_active(&ctx->poll_wait))
>> wake_up_interruptible(&ctx->poll_wait);
>> - kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
>> - }
>> }
>>
>> /* Returns true if there are no backlogged entries after the flush */
>> @@ -9304,13 +9299,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
>> return mask;
>> }
>>
>> -static int io_uring_fasync(int fd, struct file *file, int on)
>> -{
>> - struct io_ring_ctx *ctx = file->private_data;
>> -
>> - return fasync_helper(fd, file, on, &ctx->cq_fasync);
>> -}
>> -
>> static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
>> {
>> const struct cred *creds;
>> @@ -10155,7 +10143,6 @@ static const struct file_operations io_uring_fops = {
>> .mmap_capabilities = io_uring_nommu_mmap_capabilities,
>> #endif
>> .poll = io_uring_poll,
>> - .fasync = io_uring_fasync,
>> #ifdef CONFIG_PROC_FS
>> .show_fdinfo = io_uring_show_fdinfo,
>> #endif
>>
>
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] io_uring: kill fasync
2021-10-01 9:39 [PATCH 1/1] io_uring: kill fasync Pavel Begunkov
2021-10-01 14:07 ` Pavel Begunkov
@ 2021-10-01 17:16 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2021-10-01 17:16 UTC (permalink / raw)
To: Pavel Begunkov, io-uring
On 10/1/21 3:39 AM, Pavel Begunkov wrote:
> We have never supported fasync properly, it would only fire when there
> is something polling io_uring making it useless. Get rid of fasync bits.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-01 17:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-01 9:39 [PATCH 1/1] io_uring: kill fasync Pavel Begunkov
2021-10-01 14:07 ` Pavel Begunkov
2021-10-01 14:17 ` Pavel Begunkov
2021-10-01 17:16 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox