xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Re: [Xen-users] different number of cpus
       [not found] ` <20160317122234.GA23307@citrix.com>
@ 2016-03-29 22:14   ` tutu sky
  2016-03-30 16:27     ` Dario Faggioli
  0 siblings, 1 reply; 6+ messages in thread
From: tutu sky @ 2016-03-29 22:14 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

sorry, i think i got your point. i don't know exactly which menuentry in grub2 refer to xen.gz. furthermore i deleted xen.gz when i was compiled and installed xen, because it issue an error (warning) which didn't let update-grub  to be successful. after studying forums, i understood to delete it. but for the xen-4.gz is (in /boot/grub/grub.cfg):

​​
menuentry 'Ubuntu GNU/Linux, with Xen hypervisor' --class ubuntu --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-d9e946b3-a4cf-4a90-8cdf-689d19a2b869' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      searc​​h --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  d9e946b3-a4cf-4a90-8cdf-689d19a2b869
    else
      search --no-floppy --fs-uuid --set=root d9e946b3-a4cf-4a90-8cdf-689d19a2b869
    fi
    echo    'Loading Xen 4 ...'
        if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
            xen_rm_opts=
        else
            xen_rm_opts="no-real-mode edd=off"
        fi
    multiboot    /boot/xen-4.gz placeholder loglvl=all guest_loglvl=all com1=115200,8n1,0x3e8,5 console=com1,vga  ${xen_rm_opts}
    echo    'Loading Linux 3.19.0-25-generic ...'
    module    /boot/vmlinuz-3.19.0-25-generic placeholder root=UUID=d9e946b3-a4cf-4a90-8cdf-689d19a2b869 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US console=hvc0 earlyprintk=xen quiet
    echo    'Loading initial ramdisk ...'
    module    --nounzip   /boot/initrd.img-3.19.0-25-generic
}

I hope getting your meaning correctly.

________________________________________
From: Wei Liu <wei.liu2@citrix.com>
Sent: Thursday, March 17, 2016 12:22 PM
To: tutu sky
Cc: xen-users@lists.xen.org; Wei Liu
Subject: Re: [Xen-users] different number of cpus

On Sat, Mar 12, 2016 at 10:18:15AM +0000, tutu sky wrote:
> Hi all,
> i have installed Xen and while setting number of vcpus in Dom0 to 2, then go to terminal and issue "top" command, it shows me 4 core! these all happen while i have 2 cores available in /sys/devices/system/cpu (just cpu0 and cpu1), so what does it mean? I become totally confused, as i don't know what is the exact number of cores which are assigned to Xen or Dom0.
> in other words, when using "xl vcpu-set Domain-0 2" command, whys this two vcpus are showed 4 in "top" command?
>

How does your xen.gz command line argument in bootloader look like?


> would you please give me an answer?
> Thanks a lot.
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] different number of cpus
  2016-03-29 22:14   ` [Xen-users] different number of cpus tutu sky
@ 2016-03-30 16:27     ` Dario Faggioli
  2016-03-31  7:25       ` tutu sky
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Faggioli @ 2016-03-30 16:27 UTC (permalink / raw)
  To: tutu sky, Wei Liu; +Cc: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2166 bytes --]

On Tue, 2016-03-29 at 22:14 +0000, tutu sky wrote:
> menuentry 'Ubuntu GNU/Linux, with Xen hypervisor' --class ubuntu --
> class gnu-linux --class gnu --class os --class xen
> $menuentry_id_option 'xen-gnulinux-simple-d9e946b3-a4cf-4a90-8cdf-
> 689d19a2b869' {
>     insmod part_msdos
>     insmod ext2
>     set root='hd0,msdos1'
>     if [ x$feature_platform_search_hint = xy ]; then
>       search --no-floppy --fs-uuid --set=root --hint-
> bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-
> baremetal=ahci0,msdos1  d9e946b3-a4cf-4a90-8cdf-689d19a2b869
>     else
>       search --no-floppy --fs-uuid --set=root d9e946b3-a4cf-4a90-
> 8cdf-689d19a2b869
>     fi
>     echo    'Loading Xen 4 ...'
>         if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
>             xen_rm_opts=
>         else
>             xen_rm_opts="no-real-mode edd=off"
>         fi
>     multiboot    /boot/xen-4.gz placeholder loglvl=all
> guest_loglvl=all com1=115200,8n1,0x3e8,5
> console=com1,vga  ${xen_rm_opts}
>
This line here is the one.

It needs to contain dom0_max_vcpus=2.

> On Sat, Mar 12, 2016 at 10:18:15AM +0000, tutu sky wrote:
> > 
> > Hi all,
> > i have installed Xen and while setting number of vcpus in Dom0 to
> > 2, then go to terminal and issue "top" command, it shows me 4 core!
> > these all happen while i have 2 cores available in
> > /sys/devices/system/cpu (just cpu0 and cpu1), so what does it mean?
> > I become totally confused, as i don't know what is the exact number
> > of cores which are assigned to Xen or Dom0.
> > in other words, when using "xl vcpu-set Domain-0 2" command, whys
> > this two vcpus are showed 4 in "top" command?
> > 
> How does your xen.gz command line argument in bootloader look like?
> 
Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] different number of cpus
  2016-03-30 16:27     ` Dario Faggioli
@ 2016-03-31  7:25       ` tutu sky
  2016-03-31 11:22         ` Dario Faggioli
  0 siblings, 1 reply; 6+ messages in thread
From: tutu sky @ 2016-03-31  7:25 UTC (permalink / raw)
  To: Dario Faggioli, Wei Liu; +Cc: Xen-devel

thanks Dario,
But do you mean i must add the line directly in "/boot/grub/grub.cfg" ? Is there any way to do this via a variable in "/etc/default/grub" and then do "update-grub" to take effect and does the corresponding changes in "/boot/grub/grub.cfg"?
Regards.

________________________________________
From: Dario Faggioli <dario.faggioli@citrix.com>
Sent: Wednesday, March 30, 2016 4:27 PM
To: tutu sky; Wei Liu
Cc: Xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [Xen-users] different number of cpus

On Tue, 2016-03-29 at 22:14 +0000, tutu sky wrote:
> menuentry 'Ubuntu GNU/Linux, with Xen hypervisor' --class ubuntu --
> class gnu-linux --class gnu --class os --class xen
> $menuentry_id_option 'xen-gnulinux-simple-d9e946b3-a4cf-4a90-8cdf-
> 689d19a2b869' {
>     insmod part_msdos
>     insmod ext2
>     set root='hd0,msdos1'
>     if [ x$feature_platform_search_hint = xy ]; then
>       search --no-floppy --fs-uuid --set=root --hint-
> bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-
> baremetal=ahci0,msdos1  d9e946b3-a4cf-4a90-8cdf-689d19a2b869
>     else
>       search --no-floppy --fs-uuid --set=root d9e946b3-a4cf-4a90-
> 8cdf-689d19a2b869
>     fi
>     echo    'Loading Xen 4 ...'
>         if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
>             xen_rm_opts=
>         else
>             xen_rm_opts="no-real-mode edd=off"
>         fi
>     multiboot    /boot/xen-4.gz placeholder loglvl=all
> guest_loglvl=all com1=115200,8n1,0x3e8,5
> console=com1,vga  ${xen_rm_opts}
>
This line here is the one.

It needs to contain dom0_max_vcpus=2.

> On Sat, Mar 12, 2016 at 10:18:15AM +0000, tutu sky wrote:
> >
> > Hi all,
> > i have installed Xen and while setting number of vcpus in Dom0 to
> > 2, then go to terminal and issue "top" command, it shows me 4 core!
> > these all happen while i have 2 cores available in
> > /sys/devices/system/cpu (just cpu0 and cpu1), so what does it mean?
> > I become totally confused, as i don't know what is the exact number
> > of cores which are assigned to Xen or Dom0.
> > in other words, when using "xl vcpu-set Domain-0 2" command, whys
> > this two vcpus are showed 4 in "top" command?
> >
> How does your xen.gz command line argument in bootloader look like?
>
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] different number of cpus
  2016-03-31  7:25       ` tutu sky
@ 2016-03-31 11:22         ` Dario Faggioli
  2016-03-31 16:35           ` tutu sky
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Faggioli @ 2016-03-31 11:22 UTC (permalink / raw)
  To: tutu sky, Wei Liu; +Cc: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 776 bytes --]

On Thu, 2016-03-31 at 07:25 +0000, tutu sky wrote:
> thanks Dario,
> But do you mean i must add the line directly in "/boot/grub/grub.cfg"
> ? Is there any way to do this via a variable in "/etc/default/grub"
> and then do "update-grub" to take effect and does the corresponding
> changes in "/boot/grub/grub.cfg"?
>
Changing /etc/defaults/grub and running update-grub, is indeed the
correct way of doing this.

There's doc online about how to do that, e.g., here:
https://wiki.debian.org/Xen

Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] different number of cpus
  2016-03-31 11:22         ` Dario Faggioli
@ 2016-03-31 16:35           ` tutu sky
  2016-04-01 13:59             ` Dario Faggioli
  0 siblings, 1 reply; 6+ messages in thread
From: tutu sky @ 2016-03-31 16:35 UTC (permalink / raw)
  To: Dario Faggioli, Wei Liu; +Cc: Xen-devel

Thanks a lot. That works.
I think all boot parameters can be found here:
http://xenbits.xenproject.org/docs/unstable/misc/xen-command-line.html

you may want to use them or not, and if i don't make mistake, it does not make difference which linux distro is used.
Regards.

________________________________________
From: Dario Faggioli <dario.faggioli@citrix.com>
Sent: Thursday, March 31, 2016 11:22 AM
To: tutu sky; Wei Liu
Cc: Xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [Xen-users] different number of cpus

On Thu, 2016-03-31 at 07:25 +0000, tutu sky wrote:
> thanks Dario,
> But do you mean i must add the line directly in "/boot/grub/grub.cfg"
> ? Is there any way to do this via a variable in "/etc/default/grub"
> and then do "update-grub" to take effect and does the corresponding
> changes in "/boot/grub/grub.cfg"?
>
Changing /etc/defaults/grub and running update-grub, is indeed the
correct way of doing this.

There's doc online about how to do that, e.g., here:
https://wiki.debian.org/Xen

Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] different number of cpus
  2016-03-31 16:35           ` tutu sky
@ 2016-04-01 13:59             ` Dario Faggioli
  0 siblings, 0 replies; 6+ messages in thread
From: Dario Faggioli @ 2016-04-01 13:59 UTC (permalink / raw)
  To: tutu sky, Wei Liu; +Cc: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 832 bytes --]

On Thu, 2016-03-31 at 16:35 +0000, tutu sky wrote:
> Thanks a lot. That works.
> I think all boot parameters can be found here:
> http://xenbits.xenproject.org/docs/unstable/misc/xen-command-line.htm
> l
> 
Indeed.

> you may want to use them or not, and if i don't make mistake, it does
> not make difference which linux distro is used.
>
These are parameters that are effective on Xen, of course there is no
relationship with any particular distribution... Actually, it doesn't
even matter whether you're using Linux as dom0, or something else!

Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-01 13:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <HE1PR05MB1308D4C17A1D30841DB0625B8DB60@HE1PR05MB1308.eurprd05.prod.outlook.com>
     [not found] ` <20160317122234.GA23307@citrix.com>
2016-03-29 22:14   ` [Xen-users] different number of cpus tutu sky
2016-03-30 16:27     ` Dario Faggioli
2016-03-31  7:25       ` tutu sky
2016-03-31 11:22         ` Dario Faggioli
2016-03-31 16:35           ` tutu sky
2016-04-01 13:59             ` Dario Faggioli

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).