Commit 968fde8
net: hns3: add cond_resched() to hns3 ring buffer init process
Currently hns3 ring buffer init process would hold cpu too long with big
Tx/Rx ring depth. This could cause soft lockup.
So this patch adds cond_resched() to the process. Then cpu can break to
run other tasks instead of busy looping.
Fixes: a723fb8 ("net: hns3: refine for set ring parameters")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 12cda92 commit 968fde8
2 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3535 | 3535 | | |
3536 | 3536 | | |
3537 | 3537 | | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
3538 | 3541 | | |
3539 | 3542 | | |
3540 | 3543 | | |
| |||
5107 | 5110 | | |
5108 | 5111 | | |
5109 | 5112 | | |
| 5113 | + | |
5110 | 5114 | | |
5111 | 5115 | | |
5112 | 5116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
0 commit comments