Commit f55264e
committed
qed: make 'ethtool -d' 10 times faster
jira LE-2177
Rebuild_History Non-Buildable kernel-5.14.0-503.19.1.el9_5
commit-author Michal Schmidt <mschmidt@redhat.com>
commit b8db67d
As a side effect of commit 5401c3e ("qed: allow sleep in
qed_mcp_trace_dump()"), 'ethtool -d' became much slower.
Almost all the time is spent collecting the "mcp_trace".
It is caused by sleeping too long in _qed_mcp_cmd_and_union.
When called with sleeping not allowed, the function delays for 10 µs
between firmware polls. But if sleeping is allowed, it sleeps for 10 ms
instead.
The sleeps in _qed_mcp_cmd_and_union are unnecessarily long.
Replace msleep with usleep_range, which allows to achieve a similar
polling interval like in the no-sleeping mode (10 - 20 µs).
The only caller, qed_mcp_cmd_and_union, can stop doing the
multiplication/division of the usecs/max_retries. The polling interval
and the number of retries do not need to be parameters at all.
On my test system, 'ethtool -d' now takes 4 seconds instead of 44.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Link: https://patch.msgid.link/20240930201307.330692-2-mschmidt@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit b8db67d)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 12078f4 commit f55264e
1 file changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
| 462 | + | |
464 | 463 | | |
465 | | - | |
466 | 464 | | |
467 | 465 | | |
| 466 | + | |
468 | 467 | | |
469 | 468 | | |
470 | 469 | | |
| |||
488 | 487 | | |
489 | 488 | | |
490 | 489 | | |
491 | | - | |
| 490 | + | |
| 491 | + | |
492 | 492 | | |
493 | | - | |
494 | | - | |
| 493 | + | |
| 494 | + | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
| 524 | + | |
524 | 525 | | |
525 | | - | |
| 526 | + | |
526 | 527 | | |
527 | 528 | | |
528 | 529 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
| 540 | + | |
540 | 541 | | |
541 | | - | |
| 542 | + | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| |||
564 | 565 | | |
565 | 566 | | |
566 | 567 | | |
567 | | - | |
| 568 | + | |
| 569 | + | |
568 | 570 | | |
569 | 571 | | |
570 | 572 | | |
| |||
581 | 583 | | |
582 | 584 | | |
583 | 585 | | |
584 | | - | |
585 | | - | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 609 | + | |
616 | 610 | | |
617 | 611 | | |
618 | 612 | | |
| |||
0 commit comments