From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Aleksandar Rakic" <aleksandar.rakic@htecgroup.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Djordje Todorovic" <Djordje.Todorovic@htecgroup.com>,
"cfu@mips.com" <cfu@mips.com>,
"arikalo@gmail.com" <arikalo@gmail.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
qemu-block <qemu-block@nongnu.org>,
"Hanna Reitz" <hreitz@redhat.com>,
alex.bennee@linaro.org
Subject: Re: [PATCH v2 6/8] Revert use of clock_gettime for benchmarking
Date: Mon, 21 Oct 2024 12:48:49 +0100 [thread overview]
Message-ID: <ZxY_oZVKc4_tm-So@redhat.com> (raw)
In-Reply-To: <ZxY-JRCHAZF-qQiW@redhat.com>
On Mon, Oct 21, 2024 at 01:42:29PM +0200, Kevin Wolf wrote:
> Am 19.10.2024 um 21:35 hat Philippe Mathieu-Daudé geschrieben:
> > Hi,
> >
> > On 18/10/24 10:20, Aleksandar Rakic wrote:
> > > This patch reverts the commit (with SHA
> > > 50290c002c045280f8defad911901e16bfb52884 from
> > > https://github.com/MIPS/gnutools-qemu) that breaks for mingw builds,
> > > where clock_gettime and CLOCK_MONOTONIC are not available.
>
> What does "not available" mean? I'm sure that we have kept building QEMU
> with mingw in the past five years (the commit you want to revert is from
> 2019), so they must exist in some form?
They exist in the mingw headers
$ grep clock_gettime /usr/i686-w64-mingw32/sys-root/mingw/include/pthread_time.h
int __cdecl WINPTHREAD_API clock_gettime(clockid_t clock_id, struct timespec *tp);
$ grep CLOCK_MONOTONIC /usr/i686-w64-mingw32/sys-root/mingw/include/pthread_time.h
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 1
So I think we need more clarity about what's broken before we can
consider merging this.
>
> > Isn't get_clock() what we want here?
> >
> > > Cherry-picked d57c735e1af1ca719dbd0c3a904ad70c9c31cbb7
> > > from https://github.com/MIPS/gnutools-qemu
> > >
> > > Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com>
> > > Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
> > > ---
> > > qemu-io-cmds.c | 77 +++++++++++++++++++++++++-------------------------
> > > 1 file changed, 39 insertions(+), 38 deletions(-)
> >
> > Please Cc maintainers (done now):
> >
> > $ ./scripts/get_maintainer.pl -f qemu-io-cmds.c
> > Kevin Wolf <kwolf@redhat.com> (supporter:Block layer core)
> > Hanna Reitz <hreitz@redhat.com> (supporter:Block layer core)
>
> Also Alex (CCed) who is the author of the patch you want to revert.
>
> Kevin
>
> > > @@ -904,7 +905,7 @@ static const cmdinfo_t readv_cmd = {
> > > static int readv_f(BlockBackend *blk, int argc, char **argv)
> > > {
> > > - struct timespec t1, t2;
> > > + struct timeval t1, t2;
> > > bool Cflag = false, qflag = false, vflag = false;
> > > int c, cnt, ret;
> > > char *buf;
> > > @@ -964,9 +965,9 @@ static int readv_f(BlockBackend *blk, int argc, char **argv)
> > > return -EINVAL;
> > > }
> > > - clock_gettime(CLOCK_MONOTONIC, &t1);
> > > + gettimeofday(&t1, NULL);
> > > ret = do_aio_readv(blk, &qiov, offset, flags, &total);
> > > - clock_gettime(CLOCK_MONOTONIC, &t2);
> > > + gettimeofday(&t2, NULL);
> > > if (ret < 0) {
> > > printf("readv failed: %s\n", strerror(-ret));
> >
>
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-10-21 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 13:20 [PATCH v2 6/8] Revert use of clock_gettime for benchmarking Aleksandar Rakic
2024-10-19 19:35 ` Philippe Mathieu-Daudé
2024-10-21 11:42 ` Kevin Wolf
2024-10-21 11:48 ` Daniel P. Berrangé [this message]
2024-10-20 14:04 ` Paolo Bonzini
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=ZxY_oZVKc4_tm-So@redhat.com \
--to=berrange@redhat.com \
--cc=Djordje.Todorovic@htecgroup.com \
--cc=aleksandar.rakic@htecgroup.com \
--cc=alex.bennee@linaro.org \
--cc=arikalo@gmail.com \
--cc=cfu@mips.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).