[LTP] [PATCH v1] Fix wqueue09 according with 5.17 kernel updates
Cyril Hrubis
chrubis@suse.cz
Mon Mar 28 17:01:24 CEST 2022
Hi!
> Kernel 5.17 introduced many changes in the watch_queue support. In
> particular, commit 3b4c0371928c17af03e8397ac842346624017ce6 changes the
> behaviour of IOC_WATCH_QUEUE_SET_SIZE and ioctl control over watch_queue
> buffer size: now we need to generate more events than before. In
> particular, more than the bitmap size to the number of notes.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.de>
> ---
> testcases/kernel/watchqueue/wqueue09.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/watchqueue/wqueue09.c b/testcases/kernel/watchqueue/wqueue09.c
> index 55d567249..86feebf4a 100644
> --- a/testcases/kernel/watchqueue/wqueue09.c
> +++ b/testcases/kernel/watchqueue/wqueue09.c
> @@ -29,14 +29,14 @@ static void saw_data_loss(struct watch_notification *n,
>
> static void run(void)
> {
> - int fd;
> + int fd, i;
> key_serial_t key;
>
> - fd = wqueue_watch(1, &wqueue_filter);
> + fd = wqueue_watch(32, &wqueue_filter);
We may as well keep the 1 here, kernel will rount it to smallest
possible size anyways.
> key = wqueue_add_key(fd);
> - keyctl(KEYCTL_UPDATE, key, "b", 1);
> - keyctl(KEYCTL_REVOKE, key);
> + for (i = 0; i < 256; i++)
> + keyctl(KEYCTL_UPDATE, key, "b", 1);
Have you tried this on any machine with 64k pages? If the minimal size
is rounded to a PAGE_SIZE and we get 32 messages in 4k page that would
mean that we would fit 512 messages in 64k page. So maybe we would need
512 messages on 65k page size?
> data_lost = 0;
> while (!data_lost)
> --
> 2.35.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list