[v8,4/4] doc/guides/sample_app_ug/l3_forward_power_man.rst: empty poll update

Message ID 1537191016-26330-4-git-send-email-liang.j.ma@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v8,1/4] lib/librte_power: traffic pattern aware power control |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Liang, Ma Sept. 17, 2018, 1:30 p.m. UTC
  Add empty poll mode command line example

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
---
 doc/guides/sample_app_ug/l3_forward_power_man.rst | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)
  

Comments

Kovacevic, Marko Sept. 25, 2018, 1:20 p.m. UTC | #1
> Add empty poll mode command line example
> 
> Signed-off-by: Liang Ma <liang.j.ma@intel.com>
> ---
>  doc/guides/sample_app_ug/l3_forward_power_man.rst | 29
> +++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> +Empty Poll Mode
> +-------------------------
> +There is a new Mode which is added recently. Empty poll mode can be
> +enabled by command option --empty-poll.
> +
> +See "Power Management" chapter in the DPDK Programmer's Guide for
> empty poll mode details.

Can you embed the link to the Power Management chapter
:doc:`Power Management<../prog_guide/power_man>`


> +.. code-block:: console
> +
> +    ./l3fwd-power -l xxx   -n 4   -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --
> config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
> +
> +Where,
> +
> +--empty-poll: Enable the empty poll mode instead of original algorithm
> +
> +--empty-poll="training_flag, med_threshold, high_threshold"
> +
> +* training_flag : optional, enable/disable training mode. Default value is 0.
> +
> +* med_threshold : optional, indicate the empty poll threshold of modest
> state which is customized by user. Default value is 0.
> +
> +* high_threshold : optional, indicate the empty poll threshold of busy state
> which is customized by user. Default value is 0.
> +
> +* -l : optional, set up the LOW power state frequency index
> +
> +* -m : optional, set up the MED power state frequency index
> +
> +* -h : optional, set up the HIGH power state frequency index

I think in this over all section needs a lot more explanation like what are valid training flags and how to get thresholds ect.

Also you could highlight the commands it looks better:      ``training_flag``

Thanks,
Marko K
  
Hunt, David Sept. 28, 2018, 12:43 p.m. UTC | #2
Hi Liang,


I think section 21.4 "Running the Application" needs mention the empty 
poll feature. Maybe just add a mention

*   --empty-poll: Traffic Aware power management. See below for details.



On 25/9/2018 2:20 PM, Kovacevic, Marko wrote:
>> Add empty poll mode command line example
>>
>> Signed-off-by: Liang Ma <liang.j.ma@intel.com>
>> ---
>>   doc/guides/sample_app_ug/l3_forward_power_man.rst | 29
>> +++++++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> +Empty Poll Mode
>> +-------------------------
>> +There is a new Mode which is added recently. Empty poll mode can be
>> +enabled by command option --empty-poll.

In a couple of years time, it won't be 'new' or 'recent' any more. :)

Suggest:

Additionally, there is a traffic aware mode of operation called "Empty
Poll" where the number of empty polls can be monitored to keep track
of how busy the application is.Empty poll mode can be enabled by the
command line option --empty-poll.

>> +
>> +See "Power Management" chapter in the DPDK Programmer's Guide for
>> empty poll mode details.
> Can you embed the link to the Power Management chapter
> :doc:`Power Management<../prog_guide/power_man>`
>
>
>> +.. code-block:: console
>> +
>> +    ./l3fwd-power -l xxx   -n 4   -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --
>> config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
>> +
>> +Where,
>> +
>> +--empty-poll: Enable the empty poll mode instead of original algorithm
>> +
>> +--empty-poll="training_flag, med_threshold, high_threshold"
>> +
>> +* training_flag : optional, enable/disable training mode. Default value is 0.
>> +
>> +* med_threshold : optional, indicate the empty poll threshold of modest
>> state which is customized by user. Default value is 0.
>> +
>> +* high_threshold : optional, indicate the empty poll threshold of busy state
>> which is customized by user. Default value is 0.
>> +
>> +* -l : optional, set up the LOW power state frequency index
>> +
>> +* -m : optional, set up the MED power state frequency index
>> +
>> +* -h : optional, set up the HIGH power state frequency index
> I think in this over all section needs a lot more explanation like what are valid training flags and how to get thresholds ect.
>
> Also you could highlight the commands it looks better:      ``training_flag``

I'd suggest adding a "Empty Poll Mode Example Usage" section as a 
sub-section to the "Empty Poll Mode" section, which could contain 
something along the lines of the following:

Empty Poll Mode Example Usage

To initially obtain the ideal thresholds for the system, the training 
mode should be run first. This is achieved by running the l3fwd-power 
app with the training flage set to “1”, and the other paramaters set to 0.

./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f 
--config="(0,0,2),(0,1,3)" --empty-poll "1,0,0" –P

This will run the training algorithm for x seconds on each core (cores 2 
and 3), and then print out the recommended threshold values for those 
cores. The thresholds should be very similar for each core.

POWER: Bring up the Timer
POWER: set the power freq to MED
POWER: Low threshold is 230277
POWER: MED threshold is 335071
POWER: HIGH threshold is 523769
POWER: Training is Complete for 2
POWER: set the power freq to MED
POWER: Low threshold is 236814
POWER: MED threshold is 344567
POWER: HIGH threshold is 538580
POWER: Training is Complete for 3

Once the values have been measured for a particular system, the app can 
then be started without the training mode so traffic can start immediately.

./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f 
--config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P
  
Liang, Ma Sept. 28, 2018, 12:52 p.m. UTC | #3
Hi Dave, 
   thanks for your feedback. I will update document in v9.

O 28 Sep 13:43, Hunt, David wrote:
> Hi Liang,
> 
> 
> I think section 21.4 "Running the Application" needs mention the empty 
> poll feature. Maybe just add a mention
> 
> *   --empty-poll: Traffic Aware power management. See below for details.
> 
> 
> 
> On 25/9/2018 2:20 PM, Kovacevic, Marko wrote:
> >>Add empty poll mode command line example
> >>
> >>Signed-off-by: Liang Ma <liang.j.ma@intel.com>
> >>---
> >>  doc/guides/sample_app_ug/l3_forward_power_man.rst | 29
> >>+++++++++++++++++++++++
> >>  1 file changed, 29 insertions(+)
> >>
> >>+Empty Poll Mode
> >>+-------------------------
> >>+There is a new Mode which is added recently. Empty poll mode can be
> >>+enabled by command option --empty-poll.
> 
> In a couple of years time, it won't be 'new' or 'recent' any more. :)
> 
> Suggest:
> 
> Additionally, there is a traffic aware mode of operation called "Empty
> Poll" where the number of empty polls can be monitored to keep track
> of how busy the application is.Empty poll mode can be enabled by the
> command line option --empty-poll.
> 
> >>+
> >>+See "Power Management" chapter in the DPDK Programmer's Guide for
> >>empty poll mode details.
> >Can you embed the link to the Power Management chapter
> >:doc:`Power Management<../prog_guide/power_man>`
> >
> >
> >>+.. code-block:: console
> >>+
> >>+    ./l3fwd-power -l xxx   -n 4   -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 
> >>0x3 -P --
> >>config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
> >>+
> >>+Where,
> >>+
> >>+--empty-poll: Enable the empty poll mode instead of original algorithm
> >>+
> >>+--empty-poll="training_flag, med_threshold, high_threshold"
> >>+
> >>+* training_flag : optional, enable/disable training mode. Default value 
> >>is 0.
> >>+
> >>+* med_threshold : optional, indicate the empty poll threshold of modest
> >>state which is customized by user. Default value is 0.
> >>+
> >>+* high_threshold : optional, indicate the empty poll threshold of busy 
> >>state
> >>which is customized by user. Default value is 0.
> >>+
> >>+* -l : optional, set up the LOW power state frequency index
> >>+
> >>+* -m : optional, set up the MED power state frequency index
> >>+
> >>+* -h : optional, set up the HIGH power state frequency index
> >I think in this over all section needs a lot more explanation like what 
> >are valid training flags and how to get thresholds ect.
> >
> >Also you could highlight the commands it looks better:      
> >``training_flag``
> 
> I'd suggest adding a "Empty Poll Mode Example Usage" section as a 
> sub-section to the "Empty Poll Mode" section, which could contain 
> something along the lines of the following:
> 
> Empty Poll Mode Example Usage
> 
> To initially obtain the ideal thresholds for the system, the training 
> mode should be run first. This is achieved by running the l3fwd-power 
> app with the training flage set to “1”, and the other paramaters set to 
> 0.
> 
> ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f 
> --config="(0,0,2),(0,1,3)" --empty-poll "1,0,0" –P
> 
> This will run the training algorithm for x seconds on each core (cores 2 
> and 3), and then print out the recommended threshold values for those 
> cores. The thresholds should be very similar for each core.
> 
> POWER: Bring up the Timer
> POWER: set the power freq to MED
> POWER: Low threshold is 230277
> POWER: MED threshold is 335071
> POWER: HIGH threshold is 523769
> POWER: Training is Complete for 2
> POWER: set the power freq to MED
> POWER: Low threshold is 236814
> POWER: MED threshold is 344567
> POWER: HIGH threshold is 538580
> POWER: Training is Complete for 3
> 
> Once the values have been measured for a particular system, the app can 
> then be started without the training mode so traffic can start immediately.
> 
> ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f 
> --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P
> 
> 
>
  

Patch

diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 795a570..ca9c70a 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -362,3 +362,32 @@  The algorithm has the following sleeping behavior depending on the idle counter:
 If a thread polls multiple Rx queues and different queue returns different sleep duration values,
 the algorithm controls the sleep time in a conservative manner by sleeping for the least possible time
 in order to avoid a potential performance impact.
+
+Empty Poll Mode
+-------------------------
+There is a new Mode which is added recently. Empty poll mode can be enabled by
+command option --empty-poll.
+
+See "Power Management" chapter in the DPDK Programmer's Guide for empty poll mode details.
+
+.. code-block:: console
+
+    ./l3fwd-power -l xxx   -n 4   -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
+
+Where,
+
+--empty-poll: Enable the empty poll mode instead of original algorithm
+
+--empty-poll="training_flag, med_threshold, high_threshold"
+
+* training_flag : optional, enable/disable training mode. Default value is 0.
+
+* med_threshold : optional, indicate the empty poll threshold of modest state which is customized by user. Default value is 0.
+
+* high_threshold : optional, indicate the empty poll threshold of busy state which is customized by user. Default value is 0.
+
+* -l : optional, set up the LOW power state frequency index
+
+* -m : optional, set up the MED power state frequency index
+
+* -h : optional, set up the HIGH power state frequency index