Bug 632057
| Summary: | [Broadcom 5.6 bug] bnx2: Remove some unnecessary smp_mb() in tx fast path | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Narayanan D <narayanan_d> |
| Component: | kernel | Assignee: | John Feeney <jfeeney> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.6 | CC: | andriusb, benlu, cward, hjia, jfeeney, mchan, narendra_k, tao, wwlinuxengineering |
| Target Milestone: | rc | Keywords: | OtherQA, Regression |
| Target Release: | 5.6 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-01-13 21:16:12 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. in kernel-2.6.18-227.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed. ~~ Attention Customers and Partners - RHEL 5.6 Public Beta is now available on RHN ~~ A fix for this 'OtherQA' BZ should be present and testable in the release. If this Bugzilla is verified as resolved, please update the Verified field above with an appropriate value and include a summary of the testing executed and the results obtained. If you encounter any issues or have questions while testing, please describe them and set this bug into NEED_INFO. If you encounter new defects or have additional patches to request for inclusion, promptly escalate the new issues through your support representative. Finally, future Beta kernels can be found here: http://people.redhat.com/jwilson/el5/ Note: Bugs with the 'OtherQA' keyword require Third-Party testing to confirm the request has been properly addressed. See: https://bugzilla.redhat.com/describekeywords.cgi#OtherQA ). Verified that the memory barrier patch was properly backported to the bnx2 driver in 2.6.18-232.el5. Patch has been included in RHEL5.6-Snapshot4 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0017.html |
Description of problem: Include the patch to bnx2 driver from the commit 11848b964777af9c68d9160582628c2eb11f46d5 from upstream kernel 2.6.35. As the commit message indicates, the patch impacts performance. Below is the commit message - "bnx2: Remove some unnecessary smp_mb() in tx fast path. smp_mb() inside bnx2_tx_avail() is used twice in the normal bnx2_start_xmit() path (see illustration below). The full memory barrier is only necessary during race conditions with tx completion. We can speed up the tx path by replacing smp_mb() in bnx2_tx_avail() with a compiler barrier. The compiler barrier is to force the compiler to fetch the tx_prod and tx_cons from memory. In the race condition between bnx2_start_xmit() and bnx2_tx_int(), we have the following situation: bnx2_start_xmit() bnx2_tx_int() if (!bnx2_tx_avail()) BUG(); ... if (!bnx2_tx_avail()) netif_tx_stop_queue(); update_tx_index(); smp_mb(); smp_mb(); if (bnx2_tx_avail()) if (netif_tx_queue_stopped() && netif_tx_wake_queue(); bnx2_tx_avail()) With smp_mb() removed from bnx2_tx_avail(), we need to add smp_mb() to bnx2_start_xmit() as shown above to properly order netif_tx_stop_queue() and bnx2_tx_avail() to check the ring index. If it is not strictly ordered, the tx queue can be stopped forever. This improves performance by about 5% with 2 ports running bi-directional 64-byte packets."