From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: Scott Weaver <scweaver@redhat.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] getrusage03: Forcing context switches to update resource usage
Date: Tue, 17 Sep 2024 13:16:36 +0200 [thread overview]
Message-ID: <ZullFLOc6fLJyCts@yuki.lan> (raw)
In-Reply-To: <20240805063616.12572-1-liwang@redhat.com>
Hi!
> Our CI sporadically complains that this test grandchild's MAXRSS did not reach
> the expected 300MB size.
>
> 12 getrusage03.c:86: TFAIL: child.children = 258048, expected 307200
>
> As the ru_maxrss value is generally updated at certain intervals or under
> specific conditions, such as page faults or context switches. There may be
> delay between the completion of memset() and the update of ru_maxrss.
>
> To address this issue, we create a function to force context switches by
> calling sched_yield() multiple times. This approach helps to ensure that
> the system has the opportunity to update the ru_maxrss value more promptly.
>
> Reproted-by: Scott Weaver <scweaver@redhat.com>
> Signed-off-by: Li Wang <liwang@redhat.com>
This looks forgotten but should probably go in before the release...
Anyways:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-09-17 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 6:36 [LTP] [PATCH] getrusage03: Forcing context switches to update resource usage Li Wang
2024-08-05 6:58 ` Li Wang
2024-09-17 11:16 ` Cyril Hrubis [this message]
2024-09-18 3:19 ` Li Wang
Reply instructions:
You may reply publicly 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=ZullFLOc6fLJyCts@yuki.lan \
--to=chrubis@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
--cc=scweaver@redhat.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.