From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
Gurucharan <gurucharanx.g@intel.com>
Subject: [PATCH 4.14 12/35] igb: Make DMA faster when CPU is active on the PCIe link
Date: Thu, 30 Jun 2022 15:46:23 +0200 [thread overview]
Message-ID: <20220630133232.803178765@linuxfoundation.org> (raw)
In-Reply-To: <20220630133232.433955678@linuxfoundation.org>
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
[ Upstream commit 4e0effd9007ea0be31f7488611eb3824b4541554 ]
Intel I210 on some Intel Alder Lake platforms can only achieve ~750Mbps
Tx speed via iperf. The RR2DCDELAY shows around 0x2xxx DMA delay, which
will be significantly lower when 1) ASPM is disabled or 2) SoC package
c-state stays above PC3. When the RR2DCDELAY is around 0x1xxx the Tx
speed can reach to ~950Mbps.
According to the I210 datasheet "8.26.1 PCIe Misc. Register - PCIEMISC",
"DMA Idle Indication" doesn't seem to tie to DMA coalesce anymore, so
set it to 1b for "DMA is considered idle when there is no Rx or Tx AND
when there are no TLPs indicating that CPU is active detected on the
PCIe link (such as the host executes CSR or Configuration register read
or write operation)" and performing Tx should also fall under "active
CPU on PCIe link" case.
In addition to that, commit b6e0c419f040 ("igb: Move DMA Coalescing init
code to separate function.") seems to wrongly changed from enabling
E1000_PCIEMISC_LX_DECISION to disabling it, also fix that.
Fixes: b6e0c419f040 ("igb: Move DMA Coalescing init code to separate function.")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20220621221056.604304-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/igb/igb_main.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 618063d21f96..7b70e95ee352 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8618,11 +8618,10 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
struct e1000_hw *hw = &adapter->hw;
u32 dmac_thr;
u16 hwm;
+ u32 reg;
if (hw->mac.type > e1000_82580) {
if (adapter->flags & IGB_FLAG_DMAC) {
- u32 reg;
-
/* force threshold to 0. */
wr32(E1000_DMCTXTH, 0);
@@ -8655,7 +8654,6 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
/* Disable BMC-to-OS Watchdog Enable */
if (hw->mac.type != e1000_i354)
reg &= ~E1000_DMACR_DC_BMC2OSW_EN;
-
wr32(E1000_DMACR, reg);
/* no lower threshold to disable
@@ -8672,12 +8670,12 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
*/
wr32(E1000_DMCTXTH, (IGB_MIN_TXPBSIZE -
(IGB_TX_BUF_4096 + adapter->max_frame_size)) >> 6);
+ }
- /* make low power state decision controlled
- * by DMA coal
- */
+ if (hw->mac.type >= e1000_i210 ||
+ (adapter->flags & IGB_FLAG_DMAC)) {
reg = rd32(E1000_PCIEMISC);
- reg &= ~E1000_PCIEMISC_LX_DECISION;
+ reg |= E1000_PCIEMISC_LX_DECISION;
wr32(E1000_PCIEMISC, reg);
} /* endif adapter->dmac is not disabled */
} else if (hw->mac.type == e1000_82580) {
--
2.35.1
next prev parent reply other threads:[~2022-06-30 13:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 13:46 [PATCH 4.14 00/35] 4.14.286-rc1 review Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 01/35] vt: drop old FONT ioctls Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 02/35] random: schedule mix_interrupt_randomness() less often Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 03/35] ata: libata: add qc->flags in ata_qc_complete_template tracepoint Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 04/35] dm era: commit metadata in postsuspend after worker stops Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 05/35] random: quiet urandom warning ratelimit suppression message Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 06/35] USB: serial: option: add Telit LE910Cx 0x1250 composition Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 07/35] USB: serial: option: add Quectel EM05-G modem Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 08/35] USB: serial: option: add Quectel RM500K module support Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 09/35] bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 10/35] x86/xen: Remove undefined behavior in setup_features() Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 11/35] MIPS: Remove repetitive increase irq_err_count Greg Kroah-Hartman
2022-06-30 13:46 ` Greg Kroah-Hartman [this message]
2022-06-30 13:46 ` [PATCH 4.14 13/35] iio: adc: vf610: fix conversion mode sysfs node name Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 14/35] usb: chipidea: udc: check request status before setting device address Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 15/35] iio:accel:bma180: rearrange iio trigger get and register Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 16/35] iio: accel: mma8452: ignore the return value of reset operation Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 17/35] iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up() Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 18/35] iio: trigger: sysfs: fix use-after-free on remove Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 19/35] iio: adc: axp288: Override TS pin bias current for some models Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 20/35] xtensa: xtfpga: Fix refcount leak bug in setup Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 21/35] xtensa: Fix refcount leak bug in time.c Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 22/35] powerpc: Enable execve syscall exit tracepoint Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 23/35] powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 24/35] powerpc/powernv: wire up rng during setup_arch Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 25/35] ARM: dts: imx6qdl: correct PU regulator ramp delay Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 26/35] ARM: exynos: Fix refcount leak in exynos_map_pmu Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 27/35] ARM: Fix refcount leak in axxia_boot_secondary Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 28/35] ARM: cns3xxx: Fix refcount leak in cns3xxx_init Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 29/35] modpost: fix section mismatch check for exported init/exit sections Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 30/35] powerpc/pseries: wire up rng during setup_arch() Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 31/35] drm: remove drm_fb_helper_modinit Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 32/35] xen: unexport __init-annotated xen_xlate_map_ballooned_pages() Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 33/35] fdt: Update CRC check for rng-seed Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 34/35] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] Greg Kroah-Hartman
2022-06-30 13:46 ` [PATCH 4.14 35/35] swiotlb: skip swiotlb_bounce when orig_addr is zero Greg Kroah-Hartman
2022-06-30 17:09 ` [PATCH 4.14 00/35] 4.14.286-rc1 review Jon Hunter
2022-07-01 0:56 ` Guenter Roeck
2022-07-01 8:21 ` Naresh Kamboju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220630133232.803178765@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=anthony.l.nguyen@intel.com \
--cc=gurucharanx.g@intel.com \
--cc=kai.heng.feng@canonical.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).