lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net] net: fec: add pm_qos support on imx6q platform
Date


> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: 2022年9月1日 10:36
> To: Wei Fang <wei.fang@nxp.com>
> Cc: davem@davemloft.net; edumazet@google.com; pabeni@redhat.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net] net: fec: add pm_qos support on imx6q platform
>
> On Tue, 30 Aug 2022 15:01:48 +0800 wei.fang@nxp.com wrote:
> > There is a very low probability that tx timeout will occur during
> > suspend and resume stress test on imx6q platform. So we add pm_qos
> > support to prevent system from entering low level idles which may
> > affect the transmission of tx.
>
> Any more info on the issue? Is there an errata for it?
> What's the expected power consumption change?

On imx6q platform, cpuidle has some levels which may disable system/bus clocks,
this may cause tx packets can not be sent in time and the ndo_tx_timeout()
will be called. Seeing the following console logs for details.

[ 5170.028381] ------------[ cut here ]------------
[ 5170.033795] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:454 dev_watchdog+0x394/0x3c8
[ 5170.042153] NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
[ 5170.048494] Modules linked in: snvs_ui(O) mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc imx_vdoa ov5640_camera_mipi_int ov5640_camera_int v4l2_int_device galcore(O) [last unloaded: snvs_ui]
[ 5170.069267] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 5.4.0-rc7-5.4-zeus-next+g56a9ca3b7f4e #1
[ 5170.079313] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 5170.085920] [<c0112e30>] (unwind_backtrace) from [<c010cdc0>] (show_stack+0x10/0x14)
[ 5170.093724] [<c010cdc0>] (show_stack) from [<c0d2a73c>] (dump_stack+0xe0/0x114)
[ 5170.101089] [<c0d2a73c>] (dump_stack) from [<c0137380>] (__warn+0xc0/0x10c)
[ 5170.108104] [<c0137380>] (__warn) from [<c0137780>] (warn_slowpath_fmt+0x90/0xc0)
[ 5170.115644] [<c0137780>] (warn_slowpath_fmt) from [<c0ab1730>] (dev_watchdog+0x394/0x3c8)
[ 5170.123877] [<c0ab1730>] (dev_watchdog) from [<c01c47fc>] (call_timer_fn+0xc0/0x320)
[ 5170.131672] [<c01c47fc>] (call_timer_fn) from [<c01c5114>] (run_timer_softirq+0x210/0x688)
[ 5170.139991] [<c01c5114>] (run_timer_softirq) from [<c0102314>] (__do_softirq+0xf4/0x50c)
[ 5170.148139] [<c0102314>] (__do_softirq) from [<c013f094>] (irq_exit+0x128/0x180)
[ 5170.155595] [<c013f094>] (irq_exit) from [<c01a1420>] (__handle_domain_irq+0x6c/0xdc)
[ 5170.163492] [<c01a1420>] (__handle_domain_irq) from [<c054bcd0>] (gic_handle_irq+0x48/0x9c)
[ 5170.171900] [<c054bcd0>] (gic_handle_irq) from [<c0101a70>] (__irq_svc+0x70/0x98)
[ 5170.178527] regulator regulator.5: Failed to increase supply voltage: -110
[ 5170.179418] Exception stack(0xc1401ed8 to 0xc1401f20)
[ 5170.179519] 1ec0: 00000001 00000006
[ 5170.179546] 1ee0: 00000000 c140c600 00000000 af6bbd9b c140f934 db6ebdb8 c1504668 000004b3
[ 5170.179572] 1f00: 000004b3 bdb0c416 00000000 c1401f28 c0194520 c0938fcc 20010013 ffffffff
[ 5170.216432] [<c0101a70>] (__irq_svc) from [<c0938fcc>] (cpuidle_enter_state+0x16c/0x520)
[ 5170.224584] [<c0938fcc>] (cpuidle_enter_state) from [<c09393bc>] (cpuidle_enter+0x28/0x38)
[ 5170.232913] [<c09393bc>] (cpuidle_enter) from [<c016f6a4>] (do_idle+0x1dc/0x2b0)
[ 5170.240367] [<c016f6a4>] (do_idle) from [<c016fb2c>] (cpu_startup_entry+0x18/0x1c)
[ 5170.248002] [<c016fb2c>] (cpu_startup_entry) from [<c1300e20>] (start_kernel+0x404/0x4cc)
[ 5170.256598] irq event stamp: 51412072
[ 5170.260390] hardirqs last enabled at (51412084): [<c0101a74>] __irq_svc+0x74/0x98
[ 5170.268076] hardirqs last disabled at (51412095): [<c0101a60>] __irq_svc+0x60/0x98
[ 5170.275767] softirqs last enabled at (51411992): [<c013ef50>] irq_enter+0x68/0x84
[ 5170.283455] softirqs last disabled at (51411993): [<c013f094>] irq_exit+0x128/0x180
[ 5170.291217] ---[ end trace 781c3e037025657e ]---
[ 5170.295951] fec 2188000.ethernet eth0: TX ring dump
[ 5170.300930] Nr SC addr len SKB
[ 5170.305398] 0 0x0400 0x00000000 66 322bbb12
[ 5170.310296] 1 0x0400 0x00000000 124 322bbb12
[ 5170.315139] 2 0x0400 0x00000000 112 322bbb12
[ 5170.319957] 3 H 0x1c00 0x00000000 112 322bbb12
[ 5170.324775] 4 0x1c00 0x28933800 130 2734ee11
[ 5170.329593] 5 0x1c00 0x28934000 130 f36d5b3e
[ 5170.334410] 6 0x0400 0x28934800 66 322bbb12
[ 5170.339227] 7 0x0400 0x29030000 124 322bbb12
[ 5170.344097] 8 0x0400 0x29a48000 112 322bbb12
[ 5170.348997] 9 0x1c00 0x294e8000 112 dbee6d93
[ 5170.353895] 10 0x0400 0x28936800 66 322bbb12
[ 5170.358791] 11 0x0400 0x294e8070 112 322bbb12
[ 5170.363687] 12 0x0400 0x29d40000 112 322bbb12
[ 5170.368585] 13 0x0400 0x29250000 112 322bbb12
[ 5170.373483] 14 0x0400 0x29b38000 112 322bbb12
[ 5170.378350] 15 0x0400 0x29bd0000 112 322bbb12
[ 5170.383216] 16 0x0400 0x29110000 112 322bbb12
[ 5170.388083] 17 0x0400 0x29590000 112 322bbb12

So we add pm_qos to prevent cpuidle from entering low level
idles and make sure system/bus clocks are enabled.

In terms of power consumption changes, we did not measure the change, but
there will be some increase.
\
 
 \ /
  Last update: 2022-09-01 06:47    [W:0.080 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site