All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 5 of 5 V2] tools/xl: Remus - Network buffering cmdline switch
Date: Wed, 4 Sep 2013 16:24:57 +0100	[thread overview]
Message-ID: <1378308297.17510.147.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <66e6a3c645669e76e119.1377814584@athos.nss.cs.ubc.ca>

On Thu, 2013-08-29 at 15:16 -0700, Shriram Rajagopalan wrote:
> @@ -418,6 +417,13 @@ Generally useful for debugging.
>  
>  Disable memory checkpoint compression.
>  
> +=item B<-n>
> +
> +Enable network output buffering.  The default script used to configure
> +network buffering is /etc/xen/scripts/remus-netbuf-setup. If you wish to
> +use a custom script, set the global variable "remus.default.netbufscript"
> +in /etc/xen/xl.conf to point to your script.

Is this not the sort of thing you might want to control on a per domain
basis? Or perhaps on a per- "xl remus" granularity?

> +
>  =item B<-s> I<sshcommand>
>  
>  Use <sshcommand> instead of ssh.  String will be passed to sh.
> diff -r b8839e0b61c2 -r 66e6a3c64566 tools/libxl/xl.c
> --- a/tools/libxl/xl.c	Thu Aug 29 14:50:01 2013 -0700
> +++ b/tools/libxl/xl.c	Thu Aug 29 15:06:47 2013 -0700
> @@ -46,6 +46,7 @@ char *default_vifscript = NULL;
>  char *default_bridge = NULL;
>  char *default_gatewaydev = NULL;
>  char *default_vifbackend = NULL;
> +char *default_remus_netbufscript = NULL;
>  enum output_format default_output_format = OUTPUT_FORMAT_JSON;
>  int claim_mode = 1;
>  
> @@ -177,6 +178,11 @@ static void parse_global_config(const ch
>      if (!xlu_cfg_get_long (config, "claim_mode", &l, 0))
>          claim_mode = l;
>  
> +    if (!xlu_cfg_get_string (config, "remus.default.netbufscript", &buf, 0)) {
> +        free(default_remus_netbufscript);
> +        default_remus_netbufscript = strdup(buf);
> +    }

xlu_cfg_replace_string? I think the patterns you have copied predate
this function and/or were more copying which noone noticed.

(If you were feeling exceptionally keen you could update them all, not a
requirement though)

> +
>      xlu_cfg_destroy(config);
>  }
>  
> diff -r b8839e0b61c2 -r 66e6a3c64566 tools/libxl/xl.h
> --- a/tools/libxl/xl.h	Thu Aug 29 14:50:01 2013 -0700
> +++ b/tools/libxl/xl.h	Thu Aug 29 15:06:47 2013 -0700
> @@ -152,6 +152,7 @@ extern char *default_vifscript;
>  extern char *default_bridge;
>  extern char *default_gatewaydev;
>  extern char *default_vifbackend;
> +extern char *default_remus_netbufscript;
>  extern char *blkdev_start;
>  
>  enum output_format {
> diff -r b8839e0b61c2 -r 66e6a3c64566 tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c	Thu Aug 29 14:50:01 2013 -0700
> +++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 29 15:06:47 2013 -0700
> @@ -7070,8 +7070,9 @@ int main_remus(int argc, char **argv)
>      r_info.interval = 200;
>      r_info.blackhole = 0;
>      r_info.compression = 1;
> -
> -    SWITCH_FOREACH_OPT(opt, "bui:s:e", NULL, "remus", 2) {
> +    r_info.netbuf = 0;
> +
> +    SWITCH_FOREACH_OPT(opt, "buni:s:e", NULL, "remus", 2) {
>      case 'i':
>          r_info.interval = atoi(optarg);
>          break;
> @@ -7081,6 +7082,9 @@ int main_remus(int argc, char **argv)
>      case 'u':
>          r_info.compression = 0;
>          break;
> +    case 'n':
> +        r_info.netbuf = 1;
> +        break;
>      case 's':
>          ssh_command = optarg;
>          break;
> @@ -7092,6 +7096,11 @@ int main_remus(int argc, char **argv)
>      domid = find_domain(argv[optind]);
>      host = argv[optind + 1];
>  
> +    if (r_info.netbuf) {
> +        if (default_remus_netbufscript)
> +            r_info.netbufscript = strdup(default_remus_netbufscript);

Can netbufscript be const and then drop the strdup?

> +    }
> +
>      if (r_info.blackhole) {
>          send_fd = open("/dev/null", O_RDWR, 0644);
>          if (send_fd < 0) {
> @@ -7126,13 +7135,10 @@ int main_remus(int argc, char **argv)
>      /* Point of no return */
>      rc = libxl_domain_remus_start(ctx, &r_info, domid, send_fd, recv_fd, 0);
>  
> -    /* If we are here, it means backup has failed/domain suspend failed.
> -     * Try to resume the domain and exit gracefully.
> +    /* If we are here, it means remus setup/domain susppend/backup has

"suspend"

Ian.

  reply	other threads:[~2013-09-04 15:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 22:16 [PATCH 0 of 5 V2] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-08-29 22:16 ` [PATCH 1 of 5 V2] remus: add libnl3 dependency to autoconf scripts Shriram Rajagopalan
2013-09-04 13:40   ` Ian Campbell
2013-10-09  2:14     ` Shriram Rajagopalan
2013-10-09  8:06       ` Ian Campbell
2013-10-09 16:27         ` Shriram Rajagopalan
2013-10-09 16:36           ` Ian Campbell
2013-08-29 22:16 ` [PATCH 2 of 5 V2] tools/hotplug: Remus network buffering setup scripts Shriram Rajagopalan
2013-09-04 13:50   ` Ian Campbell
2013-08-29 22:16 ` [PATCH 3 of 5 V2] tools/libxl: setup/teardown Remus network buffering Shriram Rajagopalan
2013-09-04 15:17   ` Ian Campbell
2013-10-14 14:23     ` Shriram Rajagopalan
2013-10-15 10:34       ` Ian Campbell
2013-09-04 16:16   ` Ian Jackson
2013-09-04 17:22     ` Shriram Rajagopalan
2013-10-09 16:32       ` Shriram Rajagopalan
2013-10-14 16:30         ` [PATCH] libxl: Deprecate synchronous waiting for the device model Ian Jackson
2013-11-04 16:50           ` Ian Campbell
2013-11-04 17:03             ` Ian Jackson
2013-11-12 16:58               ` [PATCH RESEND] " Ian Jackson
2013-11-12 17:25                 ` Ian Campbell
2013-11-12 17:27                   ` Ian Jackson
2013-10-14 16:34         ` [PATCH 3 of 5 V2] tools/libxl: setup/teardown Remus network buffering [and 1 more messages] Ian Jackson
2013-08-29 22:16 ` [PATCH 4 of 5 V2] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-09-04 15:19   ` Ian Campbell
2013-09-05 11:25   ` Ian Jackson
2013-08-29 22:16 ` [PATCH 5 of 5 V2] tools/xl: Remus - Network buffering cmdline switch Shriram Rajagopalan
2013-09-04 15:24   ` Ian Campbell [this message]
2013-09-04 13:21 ` [PATCH 0 of 5 V2] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-09-04 13:27   ` Ian Campbell

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=1378308297.17510.147.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 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.