DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus
@ 2015-07-07  8:36 Yong Liu
  2015-07-10 12:24 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Yong Liu @ 2015-07-07  8:36 UTC (permalink / raw)
  To: dev

From: Marvin Liu <yong.liu@intel.com>

Two socket Haswell cpus on cottonwoodPass have 72 cores totally. And this
number oversize the default value of maximum core number 64.

Total number of channels should also increased for match core number.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/examples/vm_power_manager/power_manager.h b/examples/vm_power_manager/power_manager.h
index 1b45bab..f8a680a 100644
--- a/examples/vm_power_manager/power_manager.h
+++ b/examples/vm_power_manager/power_manager.h
@@ -39,7 +39,7 @@ extern "C" {
 #endif
 
 /* Maximum number of CPUS to manage */
-#define POWER_MGR_MAX_CPUS 64
+#define POWER_MGR_MAX_CPUS RTE_MAX_LCORE
 /**
  * Initialize power management.
  * Initializes resources and verifies the number of CPUs on the system.
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h
index 7e78a8b..aac4668 100644
--- a/lib/librte_power/channel_commands.h
+++ b/lib/librte_power/channel_commands.h
@@ -41,17 +41,10 @@ extern "C" {
 #include <stdint.h>
 
 /* Maximum number of CPUs */
-#define CHANNEL_CMDS_MAX_CPUS        64
-#if CHANNEL_CMDS_MAX_CPUS > 64
-#error Maximum number of cores is 64, overflow is guaranteed to \
-	cause problems with VM Power Management
-#endif
-
-/* Maximum number of channels per VM */
-#define CHANNEL_CMDS_MAX_VM_CHANNELS 64
+#define CHANNEL_CMDS_MAX_CPUS           RTE_MAX_LCORE
 
 /* Maximum number of channels per VM */
-#define CHANNEL_CMDS_MAX_VM_CHANNELS 64
+#define CHANNEL_CMDS_MAX_VM_CHANNELS    RTE_MAX_LCORE
 
 /* Valid Commands */
 #define CPU_POWER               1
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus
  2015-07-07  8:36 [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus Yong Liu
@ 2015-07-10 12:24 ` Thomas Monjalon
  2015-08-03 15:13   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-07-10 12:24 UTC (permalink / raw)
  To: Alan Carew, Pablo de Lara; +Cc: dev

Alan, Pablo, any comment?
By the way, we need a maintainer for rte_power.

2015-07-07 16:36, Yong Liu:
> From: Marvin Liu <yong.liu@intel.com>
> 
> Two socket Haswell cpus on cottonwoodPass have 72 cores totally. And this
> number oversize the default value of maximum core number 64.
> 
> Total number of channels should also increased for match core number.
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>

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

* Re: [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus
  2015-07-10 12:24 ` Thomas Monjalon
@ 2015-08-03 15:13   ` Thomas Monjalon
  2015-08-06 10:27     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-08-03 15:13 UTC (permalink / raw)
  To: Alan Carew, Pablo de Lara; +Cc: dev

Ping

2015-07-10 14:24, Thomas Monjalon:
> Alan, Pablo, any comment?
> By the way, we need a maintainer for rte_power.
> 
> 2015-07-07 16:36, Yong Liu:
> > From: Marvin Liu <yong.liu@intel.com>
> > 
> > Two socket Haswell cpus on cottonwoodPass have 72 cores totally. And this
> > number oversize the default value of maximum core number 64.
> > 
> > Total number of channels should also increased for match core number.
> > 
> > Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 

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

* Re: [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus
  2015-08-03 15:13   ` Thomas Monjalon
@ 2015-08-06 10:27     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2015-08-06 10:27 UTC (permalink / raw)
  To: Thomas Monjalon, Carew, Alan; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, August 03, 2015 4:13 PM
> To: Carew, Alan; De Lara Guarch, Pablo
> Cc: dev@dpdk.org; Liu, Yong
> Subject: Re: [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not
> work with Haswell cpus
> 
> Ping
> 
> 2015-07-10 14:24, Thomas Monjalon:
> > Alan, Pablo, any comment?
> > By the way, we need a maintainer for rte_power.
> >
> > 2015-07-07 16:36, Yong Liu:
> > > From: Marvin Liu <yong.liu@intel.com>
> > >
> > > Two socket Haswell cpus on cottonwoodPass have 72 cores totally. And
> this
> > > number oversize the default value of maximum core number 64.
> > >
> > > Total number of channels should also increased for match core number.
> > >
> > > Signed-off-by: Marvin Liu <yong.liu@intel.com>
> >
> 

NACK.
Allowing that change may end up in an undefined behaviour if user uses core 64 or more.
Will send an alternative fix, with a warning instead of an error, so user still can use the app on a machine with more than 64 cores, as long as no cores over 63 are used.

Thanks,
Pablo

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

end of thread, other threads:[~2015-08-06 10:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07  8:36 [dpdk-dev] [PATCH] rte_power: fix sample vm_power_mgr not work with Haswell cpus Yong Liu
2015-07-10 12:24 ` Thomas Monjalon
2015-08-03 15:13   ` Thomas Monjalon
2015-08-06 10:27     ` De Lara Guarch, Pablo

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