Displaying 20 results from an estimated 30 matches for "cpus_weight".
Did you mean:
cpu_weight
2007 Oct 19
4
[PATCH] nr_cpus calculation problem due to incorrect sockets_per_node
Testing on an 8-node 128-way NUMA machine has exposed a problem with
Xen''s nr_cpus calculation. In this case, since Xen cuts off recognized
CPUs at 32, the machine appears to have 16 CPUs on the first and second
nodes and none on the remaining nodes. Given this asymmetry, the
calculation of sockets_per_node (which is later used to calculate
nr_cpus) is incorrect:
2006 Jul 31
1
[PATCH 5/6] xen, tools: calculate nr_cpus via num_online_cpus
...odes);
+ return physinfo.nr_cpus;
}
diff -r 51045f276c90 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c Mon Jul 31 10:48:48 2006 -0500
+++ b/xen/arch/ia64/xen/dom0_ops.c Mon Jul 31 10:49:10 2006 -0500
@@ -203,6 +203,7 @@ long arch_do_dom0_op(dom0_op_t *op, XEN_
cpus_weight(cpu_core_map[0]) / pi->threads_per_core;
pi->sockets_per_node =
num_online_cpus() / cpus_weight(cpu_core_map[0]);
+ pi->nr_cpus = (u32)num_online_cpus();
pi->nr_nodes = 1;
pi->total_pages = total_pages;
p...
2011 Oct 20
0
[PATCH 07/12] cpufreq: allocate CPU masks dynamically
...pmstat.c 2011-09-21 16:37:46.000000000 +0200
+++ 2011-09-20/xen/drivers/acpi/pmstat.c 2011-10-14 14:53:51.000000000 +0200
@@ -211,11 +211,11 @@ static int get_cpufreq_para(struct xen_s
list_for_each(pos, &cpufreq_governor_list)
gov_num++;
- if ( (op->u.get_para.cpu_num != cpus_weight(policy->cpus)) ||
+ if ( (op->u.get_para.cpu_num != cpumask_weight(policy->cpus)) ||
(op->u.get_para.freq_num != pmpt->perf.state_count) ||
(op->u.get_para.gov_num != gov_num) )
{
- op->u.get_para.cpu_num = cpus_weight(policy->cpus);...
2011 Mar 14
0
[PATCH 3/3] _csched_cpu_pick(): simplify sched_smt_power_savings dependent condition
...(a && ...) || (!a && ...)
construct is far easier to grok with a single look.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -526,10 +526,9 @@ _csched_cpu_pick(const struct scheduler
weight_cpu = cpus_weight(cpu_idlers);
weight_nxt = cpus_weight(nxt_idlers);
/* smt_power_savings: consolidate work rather than spreading it */
- if ( ( sched_smt_power_savings
- && (weight_cpu > weight_nxt) )
- || ( !sched_smt_power_savings
- &a...
2008 Jul 14
1
[PATCH] stopmachine: add stopmachine_timeout
On Monday 14 July 2008 21:51:25 Christian Borntraeger wrote:
> Am Montag, 14. Juli 2008 schrieb Hidetoshi Seto:
> > + /* Wait all others come to life */
> > + while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
> > + if (time_is_before_jiffies(limit))
> > + goto timeout;
> > + cpu_relax();
> > + }
> > +
>
> Hmm. I think this could become interesting on virtual machines. The
> hypervisor might be to busy to schedule a spe...
2008 Jul 14
1
[PATCH] stopmachine: add stopmachine_timeout
On Monday 14 July 2008 21:51:25 Christian Borntraeger wrote:
> Am Montag, 14. Juli 2008 schrieb Hidetoshi Seto:
> > + /* Wait all others come to life */
> > + while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
> > + if (time_is_before_jiffies(limit))
> > + goto timeout;
> > + cpu_relax();
> > + }
> > +
>
> Hmm. I think this could become interesting on virtual machines. The
> hypervisor might be to busy to schedule a spe...
2011 Sep 07
10
[PATCH] IRQ: Group IRQ_MOVE_CLEANUP_VECTOR with other hypervisor IPIs
...TRACE_3D(TRC_HW_IRQ_MOVE_CLEANUP_DELAY,
irq, vector, smp_processor_id());
goto unlock;
@@ -513,7 +513,7 @@ static void send_cleanup_vector(struct i
cpus_and(cleanup_mask, cfg->old_cpu_mask, cpu_online_map);
cfg->move_cleanup_count = cpus_weight(cleanup_mask);
- genapic->send_IPI_mask(&cleanup_mask, IRQ_MOVE_CLEANUP_VECTOR);
+ genapic->send_IPI_mask(&cleanup_mask, MOVE_CLEANUP_VECTOR);
cfg->move_in_progress = 0;
}
diff -r 0268e7380953 -r c7884dbb6f7d xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Mon Sep 05 15:1...
2007 Feb 14
4
[PATCH 3/12] Provide basic Xen PM infrastructure
..._disable:
pop %ebx
#endif
diff -r 13e258a58044 xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c Wed Feb 14 11:13:40 2007 +0800
+++ b/xen/arch/x86/smp.c Wed Feb 14 14:59:49 2007 +0800
@@ -276,8 +276,9 @@ int on_selected_cpus(
{
struct call_data_struct data;
unsigned int nr_cpus = cpus_weight(selected);
-
- ASSERT(local_irq_is_enabled());
+ unsigned int self = cpu_isset(smp_processor_id(), selected);
+
+ ASSERT(!self || local_irq_is_enabled());
if ( nr_cpus == 0 )
return 0;
diff -r 13e258a58044 xen/arch/x86/x86_32/Makefile
--- a/xen/arch/x86/x86_32/Makefile Wed...
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...so one
* doesn't hit this CPU until we're ready. */
+ cpus_clear(prepared_cpus);
get_cpu();
for_each_online_cpu(i)
wake_up_process(threads[i]);
+ /* Wait all others come to life */
+ if (stopmachine_timeout) {
+ limit = jiffies + msecs_to_jiffies(stopmachine_timeout);
+ while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
+ if (time_is_before_jiffies(limit))
+ goto timeout;
+ cpu_relax();
+ }
+ }
+
/* This will release the thread on our CPU. */
put_cpu();
wait_for_completion(&finished);
@@ -169,10 +195,32 @@ kill_threads:
for_each_online_cpu(i)
if (th...
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...so one
* doesn't hit this CPU until we're ready. */
+ cpus_clear(prepared_cpus);
get_cpu();
for_each_online_cpu(i)
wake_up_process(threads[i]);
+ /* Wait all others come to life */
+ if (stopmachine_timeout) {
+ limit = jiffies + msecs_to_jiffies(stopmachine_timeout);
+ while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
+ if (time_is_before_jiffies(limit))
+ goto timeout;
+ cpu_relax();
+ }
+ }
+
/* This will release the thread on our CPU. */
put_cpu();
wait_for_completion(&finished);
@@ -169,10 +195,32 @@ kill_threads:
for_each_online_cpu(i)
if (th...
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...so one
* doesn't hit this CPU until we're ready. */
+ cpus_clear(prepared_cpus);
get_cpu();
for_each_online_cpu(i)
wake_up_process(threads[i]);
+ /* Wait all others come to life */
+ if (stopmachine_timeout) {
+ limit = jiffies + msecs_to_jiffies(stopmachine_timeout);
+ while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
+ if (time_is_before_jiffies(limit))
+ goto timeout;
+ cpu_relax();
+ }
+ }
+
/* This will release the thread on our CPU. */
put_cpu();
wait_for_completion(&finished);
@@ -169,10 +195,32 @@ kill_threads:
for_each_online_cpu(i)
if (th...
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...so one
* doesn't hit this CPU until we're ready. */
+ cpus_clear(prepared_cpus);
get_cpu();
for_each_online_cpu(i)
wake_up_process(threads[i]);
+ /* Wait all others come to life */
+ if (stopmachine_timeout) {
+ limit = jiffies + msecs_to_jiffies(stopmachine_timeout);
+ while (cpus_weight(prepared_cpus) != num_online_cpus() - 1) {
+ if (time_is_before_jiffies(limit))
+ goto timeout;
+ cpu_relax();
+ }
+ }
+
/* This will release the thread on our CPU. */
put_cpu();
wait_for_completion(&finished);
@@ -169,10 +195,32 @@ kill_threads:
for_each_online_cpu(i)
if (th...
2007 Apr 18
2
[PATCH] Simplify smp_call_function*() by using common implementation
...a_struct data;
- int cpus = num_online_cpus() - 1;
+ cpumask_t allbutself;
+ int cpus;
+
+ /* Can deadlock when called with interrupts disabled */
+ WARN_ON(irqs_disabled());
+
+ allbutself = cpu_online_map;
+ cpu_clear(smp_processor_id(), allbutself);
+
+ cpus_and(mask, mask, allbutself);
+ cpus = cpus_weight(mask);
if (!cpus)
- return;
+ return 0;
data.func = func;
data.info = info;
@@ -533,9 +545,12 @@ static void __smp_call_function(void (*f
call_data = &data;
mb();
-
- /* Send a message to all other CPUs and wait for them to respond */
- send_IPI_allbutself(CALL_FUNCTION_VECTO...
2007 Apr 18
2
[PATCH] Simplify smp_call_function*() by using common implementation
...a_struct data;
- int cpus = num_online_cpus() - 1;
+ cpumask_t allbutself;
+ int cpus;
+
+ /* Can deadlock when called with interrupts disabled */
+ WARN_ON(irqs_disabled());
+
+ allbutself = cpu_online_map;
+ cpu_clear(smp_processor_id(), allbutself);
+
+ cpus_and(mask, mask, allbutself);
+ cpus = cpus_weight(mask);
if (!cpus)
- return;
+ return 0;
data.func = func;
data.info = info;
@@ -533,9 +545,12 @@ static void __smp_call_function(void (*f
call_data = &data;
mb();
-
- /* Send a message to all other CPUs and wait for them to respond */
- send_IPI_allbutself(CALL_FUNCTION_VECTO...
2006 Sep 29
4
[PATCH 4/6] xen: export NUMA topology in physinfo hcall
...int i,j;
+ node_data_t *chunks;
+ u64 *map, node_to_cpu_64[MAX_NUMNODES];
+
xen_sysctl_physinfo_t *pi = &sysctl->u.physinfo;
pi->threads_per_core =
@@ -44,7 +52,6 @@ long arch_do_sysctl(
pi->sockets_per_node =
num_online_cpus() / cpus_weight(cpu_core_map[0]);
- pi->nr_nodes = 1;
pi->total_pages = total_pages;
pi->free_pages = avail_domheap_pages();
pi->scrub_pages = avail_scrub_pages();
@@ -52,6 +59,48 @@ long arch_do_sysctl(
memset(pi->hw_cap, 0, sizeo...
2007 Apr 18
34
[patch 00/34] Xen-pv_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP and SMP guest support (NEW!)
* dynamic ticks (NEW!)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
(non-PAE may be broken at the moment)
* xen hvc console
2007 Apr 18
34
[patch 00/34] Xen-pv_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP and SMP guest support (NEW!)
* dynamic ticks (NEW!)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
(non-PAE may be broken at the moment)
* xen hvc console
2007 Apr 18
34
[patch 00/34] Xen-pv_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP and SMP guest support (NEW!)
* dynamic ticks (NEW!)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
(non-PAE may be broken at the moment)
* xen hvc console
2007 Apr 23
27
[PATCH 00/25] xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface.
It applies to 2.6.21-rc7 + your patches + the last batch of pv_ops
patches I posted.
This patch generally restricts itself to Xen-specific parts of the tree,
though it does make a few small changes elsewhere.
These patches include:
- some helper routines for allocating address space and walking pagetables
- Xen
2007 Apr 23
27
[PATCH 00/25] xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface.
It applies to 2.6.21-rc7 + your patches + the last batch of pv_ops
patches I posted.
This patch generally restricts itself to Xen-specific parts of the tree,
though it does make a few small changes elsewhere.
These patches include:
- some helper routines for allocating address space and walking pagetables
- Xen