[LTP] [PATCH v1] Fix wqueue09 according with 5.17 kernel updates
Petr Vorel
pvorel@suse.cz
Tue Mar 29 18:03:58 CEST 2022
Hi Cyril, Andrea,
> > testcases/kernel/watchqueue/wqueue09.c | 8 ++++----
...
> > 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?
FYI while test works on small -i, it blocks on higher:
./wqueue09 -i1000
...
common.h:153: TINFO: NOTIFY[000]: ty=000000 sy=01 i=00000008
wqueue09.c:48: TPASS: Meta loss notification received
common.h:134: TINFO: Reading watch queue events
common.h:153: TINFO: NOTIFY[000]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[010]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[020]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[030]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[040]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[050]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[060]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[070]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[080]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[090]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0a0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0b0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0c0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0d0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0e0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[0f0]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[100]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[110]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[120]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[130]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[140]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[150]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[160]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[170]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[180]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[190]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[1a0]: ty=000001 sy=01 i=00000110
common.h:134: TINFO: Reading watch queue events
common.h:153: TINFO: NOTIFY[000]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[010]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[020]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[030]: ty=000001 sy=01 i=00000110
common.h:153: TINFO: NOTIFY[040]: ty=000001 sy=01 i=00000110
common.h:134: TINFO: Reading watch queue events
common.h:153: TINFO: NOTIFY[000]: ty=000000 sy=01 i=00000008
wqueue09.c:48: TPASS: Meta loss notification received
common.h:134: TINFO: Reading watch queue events
=> timeouts
I tested this on ppc64le with 65k page size on 5.17.0-rc5-150400.9-default
But it's not page size specific, as it fails also on x86_64 with the default 4k
page size.
And *without* this patch it's also broken with higher -i (tested on both x86_64
with the default 4k page size and ppc64le with 65k):
./wqueue09 -i1000
wqueue09.c:48: TPASS: Meta loss notification received
common.h:134: TINFO: Reading watch queue events
common.h:152: TINFO: NOTIFY[000]: ty=000001 sy=01 i=00000110
common.h:134: TINFO: Reading watch queue events
common.h:152: TINFO: NOTIFY[000]: ty=000000 sy=01 i=00000008
wqueue09.c:48: TPASS: Meta loss notification received
common.h:86: TBROK: add_key error: EDQUOT
Kind regards,
Petr
More information about the ltp
mailing list