[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Question about the tools/misc/xen-hptool



Hi,

I'm trying to use the xen-hptool to make one memory page offline. I
tried to search around to see how to use this tool but didn't find any
manual/tutorial about it.

I had a look at the code of xen-hptool.c and tried the command
'xen-hptool mem-offline' but it does not work (probably because of
incorrect system configuration IMO).  I really appreciate if anyone
could guide me a little bit on how to use this tool. (Maybe a wiki
page about how to use this tool will be beneficial?)

I used the latest Xen code in staging branch of xen repository. I
created a guest PV domain vm1 on Xen with credit scheduler.

I first find on page of dom1 which is mfn=0x16c47a by using xen-mfndump tool.
# xen-mfndump dump-p2m 1

 --- Dumping P2M for domain 1 ---

 Guest Width: 8, PT Levels: 4 P2M size: = 262144

...(omit the output of other pfn entries)

  pfn=0x1a ==> mfn=0x16c47a (type 0x0)

...(omit the output of other pfn entries)


I want to make mfn 0x16c47a offline, so I issue this following command:

# xen-hptool mem-offline 0x16c47a

Prepare to offline MEMORY mfn 16c47a

DOM1: No suspend port, try live migration

Failed to suspend guest 1 for mfn 16c47a


I checked the output of 'xenstore-ls', and found that  dom1 does not
set up the suspend channel.

This is the part of output of xenstore-ls for dom1

device = ""

    suspend = ""

     event-channel = ""

I'm guessing this is the reason why xen-hptool mem-offline does not work.


===My question are:===
1) How should I set up the dom1 so that the xen-hptool mem-offline
could work and solve this above issue? In other words, how should I
configure the suspend event-channel for dom1?
(I'm not so familiar with the event channel mechanism in Xen. Any
advice/help on how to make this work is really appreciated.)

2) Can I use the libxl_domain_suspend(ctx, domid, fd, 0, NULL) to
suspend the domain instead of using the event channel?

3) Do I have to suspend the guest domain before making one page of the
domain offline? Can I just pause the domain and make the page offline?


===========
Below is the output of the command  `xenstore-ls` in case you need
more information.

local = ""

 domain = ""

  0 = ""

   domid = "0"

   name = "Domain-0"

   device-model = ""

    0 = ""

     state = "running"

   libxl = ""

    disable_udev = "1"

   backend = ""

    vbd = ""

     1 = ""

      51712 = ""

       frontend = "/local/domain/1/device/vbd/51712"

       params = "/home/pennpanda/Research/rt-xen/images/vm1.img"

       script = "/etc/xen/scripts/block"

       frontend-id = "1"

       online = "1"

       removable = "0"

       bootable = "1"

       state = "4"

       dev = "xvda"

       type = "phy"

       mode = "w"

       device-type = "disk"

       discard-enable = "1"

       node = "/dev/loop0"

       physical-device = "7:0"

       hotplug-status = "connected"

       feature-flush-cache = "1"

       discard-granularity = "4096"

       discard-alignment = "0"

       discard-secure = "0"

       feature-discard = "1"

       feature-barrier = "1"

       feature-persistent = "1"

       feature-max-indirect-segments = "256"

       sectors = "52428800"

       info = "0"

       sector-size = "512"

       physical-sector-size = "512"

    console = ""

     1 = ""

      0 = ""

       frontend = "/local/domain/1/console"

       frontend-id = "1"

       online = "1"

       state = "1"

       protocol = "vt100"

    vif = ""

     1 = ""

      0 = ""

       frontend = "/local/domain/1/device/vif/0"

       frontend-id = "1"

       online = "1"

       state = "4"

       script = "/etc/xen/scripts/vif-bridge"

       mac = "00:16:3e:0f:49:33"

       bridge = "xenbr0"

       handle = "0"

       type = "vif"

       feature-sg = "1"

       feature-gso-tcpv4 = "1"

       feature-rx-copy = "1"

       feature-rx-flip = "0"

       feature-split-event-channels = "1"

       hotplug-status = "connected"

  1 = ""

   vm = "/vm/72df1959-a67e-4606-8a0b-cc18a9864f31"

   name = "vm1"

   cpu = ""

    0 = ""

     availability = "online"

    1 = ""

     availability = "online"

   memory = ""

    static-max = "1048576"

    target = "1048576"

    videoram = "0"

   device = ""

    suspend = ""

     event-channel = ""

    vbd = ""

     51712 = ""

      backend = "/local/domain/0/backend/vbd/1/51712"

      backend-id = "0"

      state = "4"

      virtual-device = "51712"

      device-type = "disk"

      protocol = "x86_64-abi"

      ring-ref = "8"

      event-channel = "15"

    vif = ""

     0 = ""

      backend = "/local/domain/0/backend/vif/1/0"

      backend-id = "0"

      state = "4"

      handle = "0"

      mac = "00:16:3e:0f:49:33"

      tx-ring-ref = "768"

      rx-ring-ref = "769"

      event-channel = "16"

      request-rx-copy = "1"

      feature-rx-notify = "1"

      feature-sg = "1"

      feature-gso-tcpv4 = "1"

   control = ""

    shutdown = ""

    platform-feature-multiprocessor-suspend = "1"

    platform-feature-xs_reset_watches = "1"

   data = ""

   domid = "1"

   store = ""

    port = "1"

    ring-ref = "890009"

   console = ""

    backend = "/local/domain/0/backend/console/1/0"

    backend-id = "0"

    limit = "1048576"

    type = "xenconsoled"

    output = "pty"

    tty = "/dev/pts/2"

    port = "2"

    ring-ref = "890008"

vm = ""

 72df1959-a67e-4606-8a0b-cc18a9864f31 = ""

  name = "vm1"

  uuid = "72df1959-a67e-4606-8a0b-cc18a9864f31"

  image = ""

   ostype = "linux"

   kernel = "/var/run/xen/bootloader.1.d/boot_kernel.LnHjpE"

   ramdisk = "/var/run/xen/bootloader.1.d/boot_ramdisk.WvGsmT"

   cmdline = "root=UUID=396d8dd9-b4b3-4353-9377-9b1030119fea ro
quiet splash $vt_handoff"

  start_time = "1429294893.15"

libxl = ""

 1 = ""

  dm-version = "qemu_xen"


Thank you very much and best regards!

Meng

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.