Bug 1256281 - swiotlb buffer is full/Out of SW-IOMMU space errors
Summary: swiotlb buffer is full/Out of SW-IOMMU space errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-24 09:27 UTC by Robin Rainton
Modified: 2016-02-15 15:35 UTC (History)
10 users (show)

Fixed In Version: 4.1.6-201.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-15 15:35:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robin Rainton 2015-08-24 09:27:45 UTC
Description of problem:

After reading SD card in reader (PCI) massive number of kernel errors come in the log:

Aug 24 10:58:31 x220 kernel: sdhci-pci 0000:0d:00.0: swiotlb buffer is full (sz: 65536 bytes)
Aug 24 10:58:31 x220 kernel: DMA: Out of SW-IOMMU space for 65536 bytes at device 0000:0d:00.0
Aug 24 10:58:31 x220 kernel: ------------[ cut here ]------------
Aug 24 10:58:31 x220 kernel: WARNING: CPU: 0 PID: 3127 at drivers/mmc/host/sdhci.c:856 sdhci_send_command+0x914/0xc60 [sdhci]()
Aug 24 10:58:31 x220 kernel: Modules linked in: vfat fat mmc_block uinput rfcomm ccm xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc ebtable_nat ebtable_broute bridge ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw bnep intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp snd_hda_codec_hdmi arc4 snd_hda_codec_conexant snd_hda_codec_generic kvm_intel kvm rtl8192ce snd_hda_intel snd_hda_controller btusb btbcm iTCO_wdt btintel fuse iTCO_vendor_support
Aug 24 10:58:31 x220 kernel: rtl_pci snd_hda_codec snd_hda_core bluetooth snd_hwdep snd_seq rtl8192c_common crct10dif_pclmul rtlwifi crc32_pclmul mac80211 snd_seq_device crc32c_intel ghash_clmulni_intel snd_pcm cfg80211 joydev i2c_i801 thinkpad_acpi tpm_tis snd_timer mei_me wmi tpm mei rfkill snd shpchp lpc_ich soundcore mfd_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc 8021q garp stp llc mrp i915 i2c_algo_bit drm_kms_helper sdhci_pci serio_raw sdhci drm e1000e mmc_core ptp pps_core video
Aug 24 10:58:31 x220 kernel: CPU: 0 PID: 3127 Comm: Xorg Not tainted 4.1.5-200.fc22.x86_64 #1
Aug 24 10:58:31 x220 kernel: Hardware name: LENOVO 4286CTR/4286CTR, BIOS 8DET63WW (1.33 ) 07/19/2012
Aug 24 10:58:31 x220 kernel: 0000000000000000 0000000071063029 ffff88021e203bc0 ffffffff8179b89d
Aug 24 10:58:31 x220 kernel: 0000000000000000 0000000000000000 ffff88021e203c00 ffffffff810a165a
Aug 24 10:58:31 x220 kernel: ffff8802122dc4c0 ffff8802122dc4c0 ffff8800458a98f0 ffff8800458a9970
Aug 24 10:58:31 x220 kernel: Call Trace:
Aug 24 10:58:31 x220 kernel: <IRQ>  [<ffffffff8179b89d>] dump_stack+0x45/0x57
Aug 24 10:58:31 x220 kernel: [<ffffffff810a165a>] warn_slowpath_common+0x8a/0xc0
Aug 24 10:58:31 x220 kernel: [<ffffffff810a178a>] warn_slowpath_null+0x1a/0x20
Aug 24 10:58:31 x220 kernel: [<ffffffffa010ed54>] sdhci_send_command+0x914/0xc60 [sdhci]
Aug 24 10:58:31 x220 kernel: [<ffffffff810d3d68>] ? __enqueue_entity+0x78/0x80
Aug 24 10:58:31 x220 kernel: [<ffffffff810dbc81>] ? enqueue_entity+0x311/0x9c0
Aug 24 10:58:31 x220 kernel: [<ffffffffa010fce4>] sdhci_finish_command+0x154/0x160 [sdhci]
Aug 24 10:58:31 x220 kernel: [<ffffffff810dab19>] ? check_preempt_wakeup+0x1a9/0x230
Aug 24 10:58:31 x220 kernel: [<ffffffffa0110023>] sdhci_irq+0x273/0x9ba [sdhci]
Aug 24 10:58:31 x220 kernel: [<ffffffff810cb67c>] ? check_preempt_curr+0x8c/0xa0
Aug 24 10:58:31 x220 kernel: [<ffffffff810fa477>] handle_irq_event_percpu+0x77/0x1a0
Aug 24 10:58:31 x220 kernel: [<ffffffff810fa5db>] handle_irq_event+0x3b/0x60
Aug 24 10:58:31 x220 kernel: [<ffffffff810fd7a9>] handle_fasteoi_irq+0x79/0x120
Aug 24 10:58:31 x220 kernel: [<ffffffff810173b4>] handle_irq+0x74/0x140
Aug 24 10:58:31 x220 kernel: [<ffffffff817a4bef>] do_IRQ+0x4f/0xf0
Aug 24 10:58:31 x220 kernel: [<ffffffff8110b4c9>] ? update_process_times+0x59/0x60
Aug 24 10:58:31 x220 kernel: [<ffffffff817a29ae>] common_interrupt+0x6e/0x6e
Aug 24 10:58:31 x220 kernel: [<ffffffff8101e9b9>] ? read_tsc+0x9/0x10
Aug 24 10:58:31 x220 kernel: [<ffffffff810a5c51>] ? __do_softirq+0x81/0x2d0
Aug 24 10:58:31 x220 kernel: [<ffffffff810a5bf0>] ? __do_softirq+0x20/0x2d0
Aug 24 10:58:31 x220 kernel: [<ffffffff8106ff60>] ? do_flush_tlb_all+0x50/0x50
Aug 24 10:58:31 x220 kernel: [<ffffffff810a60e5>] irq_exit+0x145/0x150
Aug 24 10:58:31 x220 kernel: [<ffffffff817a4cd6>] smp_apic_timer_interrupt+0x46/0x60
Aug 24 10:58:31 x220 kernel: [<ffffffff817a2d3e>] apic_timer_interrupt+0x6e/0x80
Aug 24 10:58:31 x220 kernel: <EOI>
Aug 24 10:58:31 x220 kernel: ---[ end trace 88d2774a86cb0667 ]---

This is on a Lenovo X220 laptop. This card reader has worked flawlessly with older kernels. Although I am not sure which update caused the problem.

The SD reader is connected on the PCI bus as seen on lspci:

0d:00.0 System peripheral: Ricoh Co Ltd PCIe SDXC/MMC Host Controller (rev 07)

I have tried increasing space with kernel argument "swiotlb=524288" but this simply delays the problem. It does not fix it.

Version-Release number of selected component (if applicable):

FC22

Linux x220 4.1.5-200.fc22.x86_64 #1 SMP Mon Aug 10 23:38:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:

100%

Steps to Reproduce:
1. Insert SD card in PCI reader.
2. Access card (read only will do it).
3. Look for kernel errors in /var/log/messages

Actual results:

Massive number of errors as shown above.
Other peripherals (such as mouse) slow to a grind.

Expected results:

Everything should work as usual. No slowdown.

Additional info:

Comment 1 H.J. Lu 2015-08-25 19:57:11 UTC
mmc-sdhci-fix-dma-memory-leak-in-sdhci_pre_req.patch can't be used without

commit 208489032bdd8d4a7de50f3057c175058f271956
Author: Chaotian Jing <chaotian.jing>
Date:   Mon Jun 15 19:20:48 2015 +0800

    mmc: mediatek: Add Mediatek MMC driver
    
    Add Mediatek MMC driver code
    Support eMMC/SD/SDIO
    
    Signed-off-by: Chaotian Jing <chaotian.jing>
    Signed-off-by: Ulf Hansson <ulf.hansson>

Comment 2 H.J. Lu 2015-08-25 22:05:02 UTC
The change from

commit 208489032bdd8d4a7de50f3057c175058f271956
Author: Chaotian Jing <chaotian.jing>
Date:   Mon Jun 15 19:20:48 2015 +0800

    mmc: mediatek: Add Mediatek MMC driver
    
    Add Mediatek MMC driver code
    Support eMMC/SD/SDIO
    
    Signed-off-by: Chaotian Jing <chaotian.jing>
    Signed-off-by: Ulf Hansson <ulf.hansson>

enables kernel build:

diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index de722d4e..258daf9 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -121,6 +121,7 @@ struct mmc_data {
 	struct mmc_request	*mrq;		/* associated request */
 
 	unsigned int		sg_len;		/* size of scatter list */
+	int			sg_count;	/* mapped sg entries */
 	struct scatterlist	*sg;		/* I/O scatter list */
 	s32			host_cookie;	/* host private data */
 };

Comment 3 Laura Abbott 2015-08-25 23:45:26 UTC
Thanks for pointing out the extra patch.

Comment 4 Fedora Update System 2015-09-05 01:03:09 UTC
kernel-4.1.6-201.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15130

Comment 5 Fedora Update System 2015-09-06 18:52:06 UTC
kernel-4.1.6-201.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update kernel'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15130

Comment 6 Fedora Update System 2015-09-11 17:21:16 UTC
kernel-4.1.6-201.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-09-15 17:36:13 UTC
kernel-4.1.7-100.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15933

Comment 8 Fedora Update System 2015-09-17 01:02:41 UTC
kernel-4.1.7-100.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update kernel'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15933

Comment 9 Fedora Update System 2015-09-23 00:20:42 UTC
kernel-4.1.7-100.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.