回复: [PATCH v1 3/3] examples/l3fwd-power: enable PMD power mgmt on Arm
Feifei Wang
Feifei.Wang2 at arm.com
Thu Oct 27 11:43:47 CEST 2022
> -----邮件原件-----
> 发件人: Stephen Hemminger <stephen at networkplumber.org>
> 发送时间: Friday, October 21, 2022 6:10 AM
> 收件人: Feifei Wang <Feifei.Wang2 at arm.com>
> 抄送: David Hunt <david.hunt at intel.com>; dev at dpdk.org; nd
> <nd at arm.com>; Ruifeng Wang <Ruifeng.Wang at arm.com>
> 主题: Re: [PATCH v1 3/3] examples/l3fwd-power: enable PMD power mgmt
> on Arm
>
> On Thu, 25 Aug 2022 14:42:51 +0800
> Feifei Wang <feifei.wang2 at arm.com> wrote:
>
> > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-
> power/main.c
> > index 887c6eae3f..2bd0d700f0 100644
> > --- a/examples/l3fwd-power/main.c
> > +++ b/examples/l3fwd-power/main.c
> > @@ -432,8 +432,16 @@ static void
> > signal_exit_now(int sigtype)
> > {
> >
> > - if (sigtype == SIGINT)
> > + if (sigtype == SIGINT) {
> > +#if defined(RTE_ARCH_ARM64)
> > + /**
> > + * wake_up api does not need input parameter on Arm,
> > + * so 0 is meaningless here.
> > + */
> > + rte_power_monitor_wakeup(0);
> > +#endif
> > quit_signal = true;
> > + }
> >
>
> This method is problematic. There is no guarantee that power monitor is
> async signal safe.
Agree with this. We will put 'rte_power_monitor_wakeup' out of signal_exit.
And put it after that main_lcore exit 'main_empty_poll_loop':
-----------------------------------------------------------------------------------------------------------------
rte_eal_mp_remote_launch(main_telemetry_loop, NULL, CALL_MAIN);
%wake up all worker calls from low power state.
rte_power_monitor_wakeup(0);
if (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY)
launch_timer(rte_lcore_id());
RTE_LCORE_FOREACH_WORKER(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
}
-----------------------------------------------------------------------------------------------------------------
More information about the dev
mailing list