qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Eric Blake <eblake@redhat.com>
Cc: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,
	Pradeep Jagadeesh <pradeepkiruvale@gmail.com>,
	alberto garcia <berto@igalia.com>,
	jani kokkonen <jani.kokkonen@huawei.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling
Date: Wed, 17 May 2017 18:29:38 +0200	[thread overview]
Message-ID: <20170517182938.0c7f366e@bahia.lan> (raw)
In-Reply-To: <2c0e99ce-f3cb-90e8-baed-8fad9d39455b@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]

On Wed, 17 May 2017 10:28:33 -0500
Eric Blake <eblake@redhat.com> wrote:

> On 05/17/2017 09:53 AM, Pradeep Jagadeesh wrote:
> 
> >>> +#ifdef _WIN64
> >>> +
> >>> +void qmp_fsdev_set_io_throttle(IOThrottle *arg, Error **errp)
> >>> +{
> >>> +  return;
> >>> +}
> >>> +
> >>> +IOThrottleList *qmp_query_fsdev_io_throttle(Error **errp)
> >>> +{
> >>> +    abort();
> >>> +}
> >>> +
> >>> +#endif  
> >>
> >> I think you're missing an addition to monitor.c
> >> qmp_unregister_commands_hack() if you intend for this command to be
> >> available only on non-windows platforms (and is your #ifdef the correct
> >> name, or is this a Linux-only feature rather than a non-windows feature).  
> > I had to add this one here because, I was getting some error when I
> > cross compile for Windows. But I do not have any idea about, do I need
> > to add in monitor.c or not.  
> 
> First point: is fsdev a Linux-only feature, or can it be compiled on
> BSD?  If it is Linux-only, then compiling a stub for Windows will still
> leave BSD broken, and your #ifdef is wrong.  Fixing compilation on mingw
> is nice, but not the only platform to worry about.
> 

fsdev compilation currently depends on CONFIG_VIRTFS which is a Linux-only
feature for the moment. There was a tentative to support it on Windows hosts
two years ago but it stayed at the RFC stage.

But even on Linux hosts, the current fsdev implementation also depends on
the target supporting PCI and VIRTIO. We have a fsdev/qemu-fsdev-dummy.c
file to put stubs so that we don't pull all the code for such targets.

Maybe this could be reused for the above stubs as well ?

> Second point: if fsdev is indeed a platform-specific feature, then we
> don't want to advertise the QMP commands that are useless when running
> on a platform that doesn't support it. Anywhere you have to add a stub
> for compilation means you ALSO need to patch monitor.c to unregister the
> command from being advertised as a valid QMP command.  (If you used
> #ifdef __LINUX__ to guard the working version, and #ifndef __LINUX__ to
> declare the stub, then the monitor.c needs an #ifndef section within
> qmp_unregister_commands_hack() to tell QMP to not advertise the stubs.)
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-05-17 16:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  8:41 [Qemu-devel] [PATCH v4 0/4] fsdev: qmp interface for io throttling Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 1/4] throttle: factor out duplicate code Pradeep Jagadeesh
2017-05-10 14:12   ` Greg Kurz
2017-05-10 15:27     ` Pradeep Jagadeesh
2017-05-10 19:48       ` Eric Blake
2017-05-11 16:12         ` Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 2/4] qmp: Create IOThrottle structure Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 3/4] qmp: refactor duplicate code Pradeep Jagadeesh
2017-05-10 19:56   ` Eric Blake
2017-05-11 16:14     ` Pradeep Jagadeesh
2017-05-11  7:50   ` Greg Kurz
2017-05-12  8:03     ` Pradeep Jagadeesh
2017-06-08 14:20       ` Greg Kurz
2017-06-09  8:32         ` Pradeep Jagadeesh
2017-05-10  8:41 ` [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling Pradeep Jagadeesh
2017-05-10 20:00   ` Eric Blake
2017-05-17 14:53     ` Pradeep Jagadeesh
2017-05-17 15:28       ` Eric Blake
2017-05-17 16:29         ` Greg Kurz [this message]
2017-05-17 17:09           ` Eric Blake
2017-05-18 13:30             ` Pradeep Jagadeesh
2017-06-08 16:49               ` Greg Kurz
2017-06-09  8:31                 ` Pradeep Jagadeesh
2017-06-09  9:07                   ` Greg Kurz
2017-06-09  9:13                     ` Pradeep Jagadeesh
2017-06-09  9:20                       ` Greg Kurz
2017-05-10 10:02 ` [Qemu-devel] [PATCH v4 0/4] fsdev: qmp interface for io throttling no-reply

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=20170517182938.0c7f366e@bahia.lan \
    --to=groug@kaod.org \
    --cc=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=jani.kokkonen@huawei.com \
    --cc=pradeep.jagadeesh@huawei.com \
    --cc=pradeepkiruvale@gmail.com \
    --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).