All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: William Pitcock <nenolod@dereferenced.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 2/2] blkback: Add default policy values for I/O	QoS code
Date: Tue, 31 Mar 2009 00:22:53 -0700	[thread overview]
Message-ID: <49D1C4CD.70404@goop.org> (raw)
In-Reply-To: <9d22c2b519c198454814a1011283144b3736627b.1238468013.git.nenolod@dereferenced.org>

William Pitcock wrote:
> This patch adds default values which define a default QoS policy for
> guest I/O. A sysctl interface will be added once /proc/sys/xen is available
> again... unless I come up with a better idea in the meantime.
>   

What would that interface look like?  Would the parameters be per 
domain, or per device?  Would sysfs be suitable?

    J
> Ideas?
>
> Signed-off-by: William Pitcock <nenolod@dereferenced.org>
> ---
>  drivers/xen/blkback/interface.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/xen/blkback/interface.c b/drivers/xen/blkback/interface.c
> index c6c3e14..9541ec4 100644
> --- a/drivers/xen/blkback/interface.c
> +++ b/drivers/xen/blkback/interface.c
> @@ -34,9 +34,13 @@
>  #include <xen/events.h>
>  #include <xen/grant_table.h>
>  #include <linux/kthread.h>
> +#include <linux/sysctl.h>
>  
>  static struct kmem_cache *blkif_cachep;
>  
> +static int blkif_reqmax = 500000;
> +static int blkif_reqrate = 512;
> +
>  blkif_t *blkif_alloc(domid_t domid)
>  {
>  	blkif_t *blkif;
> @@ -53,6 +57,11 @@ blkif_t *blkif_alloc(domid_t domid)
>  	blkif->st_print = jiffies;
>  	init_waitqueue_head(&blkif->waiting_to_free);
>  
> +	/* initialize QoS values to defaults */
> +	blkif->reqrate = blkif_reqrate;
> +	blkif->reqmax = blkif_reqmax;
> +	blkif->reqcount = blkif->reqmax;
> +
>  	return blkif;
>  }
>  
>   

  reply	other threads:[~2009-03-31  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31  2:53 [PATCH 0/2] RFC: Implement I/O QoS in dom0 William Pitcock
2009-03-31  2:12 ` [PATCH 1/2] blkback: Implement VBD QoS mechanics William Pitcock
2009-03-31  2:38 ` [PATCH 2/2] blkback: Add default policy values for I/O QoS code William Pitcock
2009-03-31  7:22   ` Jeremy Fitzhardinge [this message]
2009-03-31  8:12     ` Ian Campbell
2009-03-31 12:25     ` William Pitcock

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=49D1C4CD.70404@goop.org \
    --to=jeremy@goop.org \
    --cc=nenolod@dereferenced.org \
    --cc=xen-devel@lists.xensource.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.