linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SWIOTLB on 32-bit PAE
@ 2015-10-05  8:31 Christian Melki
       [not found] ` <561254A7.4000805@t2data.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Melki @ 2015-10-05  8:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: konrad.wilk

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

Hi,

I discovered that my 32-bit PAE 4.2.0 kernel (no IOMMU code) would hang 
when writing to my USB disk. The kernel spews million(-ish messages per 
sec) to syslog, effectively "hanging" userspace with my kernel.

Oct  2 14:33:06 voodoochild kernel: [  223.287447] nommu_map_sg: 
overflow 25dcac000+1024 of device mask ffffffff
Oct  2 14:33:06 voodoochild kernel: [  223.287448] nommu_map_sg: 
overflow 25dcac000+1024 of device mask ffffffff
Oct  2 14:33:06 voodoochild kernel: [  223.287449] nommu_map_sg: 
overflow 25dcac000+1024 of device mask ffffffff
... etc ...

In my kernel config I noticed that SWIOTLB was not on. It seems SWIOTLB 
is provided for 64-bit and 32-bit with IOMMU/AGPGART code. But if I 
compiled the kernel with PAE and no IOMMU and no other GART code, I 
would not get SWIOTLB. I'd like to think that SWIOTLB should be selected 
for 32-bit PAE as default.

I have attached a oneliner patch which does that.
The patch works for me. The issue where the kernel more or less runs 
endless bashing of (nommu_?)map_sg when failing is another problem I 
guess. I expected the kernel/drivers to have some more graceful 
handling, but I know to little about this area to have a proper opinion.

Regards,
Christian

[-- Attachment #2: swiotlb.patch --]
[-- Type: text/x-patch, Size: 481 bytes --]

diff -urN linux-4.2.orig/arch/x86/Kconfig linux-4.2/arch/x86/Kconfig
--- linux-4.2.orig/arch/x86/Kconfig	2015-10-05 08:56:58.933313678 +0200
+++ linux-4.2/arch/x86/Kconfig	2015-10-05 09:00:00.916306025 +0200
@@ -1282,6 +1282,7 @@
 config X86_PAE
 	bool "PAE (Physical Address Extension) Support"
 	depends on X86_32 && !HIGHMEM4G
+	select SWIOTLB
 	---help---
 	  PAE is required for NX support, and furthermore enables
 	  larger swapspace support for non-overcommit purposes. It

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-07 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-05  8:31 SWIOTLB on 32-bit PAE Christian Melki
     [not found] ` <561254A7.4000805@t2data.com>
2015-10-05 14:21   ` Fwd: " Konrad Rzeszutek Wilk
2015-10-05 15:31     ` Christian Melki
2015-10-07 19:45       ` Konrad Rzeszutek Wilk

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).