search for: set_smp

Displaying 20 results from an estimated 55 matches for "set_smp".

2015 Nov 10
0
[PATCH] customize, dib, resize, sysprep: Use 'may' pattern in various places.
...customize/customize_main.ml @@ -166,9 +166,8 @@ read the man page virt-customize(1). (* Connect to libguestfs. *) let g = let g = open_guestfs () in - - (match memsize with None -> () | Some memsize -> g#set_memsize memsize); - (match smp with None -> () | Some smp -> g#set_smp smp); + may g#set_memsize memsize; + may g#set_smp smp; g#set_network network; (* Make sure to turn SELinux off to avoid awkward interactions * between the appliance kernel and applications/libraries interacting diff --git a/dib/dib.ml b/dib/dib.ml index 1ae8876..fdb5857 10064...
2020 Sep 18
1
Re: [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
On Friday, 18 September 2020 11:44:04 CEST Richard W.M. Jones wrote: > let g = open_guestfs ~identifier:"v2v" () in > g#set_memsize (g#get_memsize () * 14 / 5); > + (* Setting the number of vCPUs allows parallel mkinitrd. *) > + g#set_smp (Sysconf.nr_processors_online ()); IMHO this is not a good idea, for few reasons: a) it unconditionally uses all the available CPUs with no way to change it to any other value b) virt-v2v is run also on systems that are not specifically dedicated as conversion servers, for example the oVirt host...
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...insertions(+), 99 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index 8b4c20765..9b907ac8e 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -688,8 +688,8 @@ let main () = let g = let g = open_guestfs () in - may g#set_memsize cmdline.memsize; - may g#set_smp cmdline.smp; + Option.may g#set_memsize cmdline.memsize; + Option.may g#set_smp cmdline.smp; g#set_network cmdline.network; (* The output disk is being created, so use cache=unsafe here. *) @@ -781,6 +781,6 @@ let main () = Pervasives.flush Pervasives.stdout; Pervasives.flus...
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...let g = - let g = new G.guestfs () in - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; + let g = open_guestfs () in (match memsize with None -> () | Some memsize -> g#set_memsize memsize); (match smp with None -> () | Some smp -> g#set_smp smp); diff --git a/customize/customize_main.ml b/customize/customize_main.ml index 49d510c..e161e82 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -165,9 +165,7 @@ read the man page virt-customize(1). (* Connect to libguestfs. *) let g = - let g = new G.gue...
2015 Feb 26
1
[PATCH] builder: handle -v and -x flags like in other tools (RHBZ#1196100)
...let g = let g = new G.guestfs () in - if verbose then g#set_trace true; + if trace then g#set_trace true; + if verbose then g#set_verbose true; (match memsize with None -> () | Some memsize -> g#set_memsize memsize); (match smp with None -> () | Some smp -> g#set_smp smp); -- 2.1.0
2020 Sep 18
4
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
So it didn't make any noticable difference in my test. I wonder if the test guest I'm using (Fedora 32 using dracut) doesn't use parallel compression? However I don't think it can cause a problem and it seems obvious that it could benefit some cases. Rich.
2016 Jul 13
0
[PATCH 5/5] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...tool/test-tool.c | 1 - tests/selinux/run-test.pl | 2 -- 13 files changed, 33 insertions(+), 73 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index b513ca3..15e1696 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -642,12 +642,6 @@ let main () = may g#set_smp cmdline.smp; g#set_network cmdline.network; - (* Make sure to turn SELinux off to avoid awkward interactions - * between the appliance kernel and applications/libraries interacting - * with SELinux xattrs. - *) - g#set_selinux false; - (* The output disk is being creat...
2016 Jul 14
0
[PATCH v2 6/7] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...tool/test-tool.c | 1 - tests/selinux/run-test.pl | 2 -- 13 files changed, 33 insertions(+), 73 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index b513ca3..15e1696 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -642,12 +642,6 @@ let main () = may g#set_smp cmdline.smp; g#set_network cmdline.network; - (* Make sure to turn SELinux off to avoid awkward interactions - * between the appliance kernel and applications/libraries interacting - * with SELinux xattrs. - *) - g#set_selinux false; - (* The output disk is being creat...
2014 Sep 29
2
[PATCH 1/2] builder, customize: disable SELinux
...tomize_main.ml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index a407924..5195cfd 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -633,7 +633,11 @@ let main () = (match smp with None -> () | Some smp -> g#set_smp smp); g#set_network network; - g#set_selinux ops.flags.selinux_relabel; + (* Make sure to turn SELinux off to avoid awkward interactions + * between the appliance kernel and applications/libraries interacting + * with SELinux xattrs. + *) + g#set_selinux false; (*...
2020 Sep 16
2
Re: virt-v2v: Virtio-Scsi patch
...The SMP 'change' is quite stupid atm :) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 73edff2c..271e2b03 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -88,6 +88,7 @@ let rec main () =    let g = open_guestfs ~identifier:"v2v" () in    g#set_memsize (g#get_memsize () * 14 / 5); +  g#set_smp 4;    (* The network is only used by the unconfigure_vmware () function. *)    g#set_network true;    (match conversion_mode with No commandline flag or so (for now). > > - - - > > I think this patch as it stands has two problems: > > (a) It should be split up into 3 patches....
2014 Jan 24
2
[PATCH 0/2] Implement virt-builder --selinux-relabel option.
Do SELinux relabelling properly.
2015 Sep 01
3
[PATCH 1/3] mllib: make few command line options stuff private
Make print_version_and_exit, long_options, display_short_options, and display_long_options private, as set_standard_options now takes care of handling the job for the common command line options. --- mllib/common_utils.mli | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 79032bc..24f8f83 100644 --- a/mllib/common_utils.mli +++
2012 Feb 23
1
[PATCH v2] Add a flag to make some functions called only at CONFIG state(RHBZ796520)
...et_pgroup", (RErr, [Bool "pgroup"], []), -1, [FishAlias "pgroup"; ConfigOnly], [], "set process group flag", "\ @@ -1637,7 +1637,7 @@ C<^C> to kill the subprocess."); "\ This returns the process group flag."); - ("set_smp", (RErr, [Int "smp"], []), -1, [FishAlias "smp"], + ("set_smp", (RErr, [Int "smp"], []), -1, [FishAlias "smp"; ConfigOnly], [], "set number of virtual CPUs in appliance", "\ diff --git a/generator/generator_c.ml b/ge...
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2015 Nov 11
0
[PATCH] builder: Make the interface between cmdline.ml and builder.ml explicit.
...ref (cmdline.delete_on_failure && not output_is_block_dev) in let delete_file () = if !delete_output_file then try unlink output_filename with _ -> () @@ -626,9 +623,9 @@ let main () = let g = let g = open_guestfs () in - may g#set_memsize memsize; - may g#set_smp smp; - g#set_network network; + may g#set_memsize cmdline.memsize; + may g#set_smp cmdline.smp; + g#set_network cmdline.network; (* Make sure to turn SELinux off to avoid awkward interactions * between the appliance kernel and applications/libraries interacting @@ -643,7 +6...
2020 Sep 18
0
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
...v/v2v.ml b/v2v/v2v.ml index 73edff2c4..7637b1a8c 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -88,6 +88,8 @@ let rec main () = let g = open_guestfs ~identifier:"v2v" () in g#set_memsize (g#get_memsize () * 14 / 5); + (* Setting the number of vCPUs allows parallel mkinitrd. *) + g#set_smp (Sysconf.nr_processors_online ()); (* The network is only used by the unconfigure_vmware () function. *) g#set_network true; (match conversion_mode with -- 2.27.0
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...pliance: dnl ocfs2-tools parted +policycoreutils procps procps-ng psmisc diff --git a/builder/builder.ml b/builder/builder.ml index e7be901..a0ef6d7 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -585,7 +585,10 @@ let main () = (match smp with None -> () | Some smp -> g#set_smp smp); g#set_network network; - g#set_selinux ops.flags.selinux_relabel; + (* If a relabel is needed, make sure to turn SELinux off to avoid + * awkward interactions with the relabel process. + *) + if ops.flags.selinux_relabel then g#set_selinux false; (* The output d...
2015 Nov 11
2
[PATCH 1/2] dib: Make the interface between cmdline.ml and dib.ml explicit.
...ramdisk || StringSet.mem "ironic-agent" all_elements in + let is_ramdisk_build = + cmdline.is_ramdisk || StringSet.mem "ironic-agent" all_elements in let g, tmpdisk, tmpdiskfmt, drive_partition = let g = open_guestfs () in - may g#set_memsize memsize; - may g#set_smp smp; - g#set_network network; + may g#set_memsize cmdline.memsize; + may g#set_smp cmdline.smp; + g#set_network cmdline.network; (* Make sure to turn SELinux off to avoid awkward interactions * between the appliance kernel and applications/libraries interacting @@ -643,17 +...
2016 Jul 18
3
[PATCH v4 0/2] mllib: Various fixes and changes to Getopt module.
v3 -> v4: - Pushed the first patch upstream since it was ACKed. - Prevent use of M except for the special virt-v2v options. - Sort the options after added --help etc. - Make corresponding fixes to the tests. Rich.
2016 Jul 18
4
[PATCH v3 0/3] mllib: Various fixes and changes to Getopt module.
v2 -> v3: - Add M variant and test it. Rich.