* THP broken on MIPS-32 [3.8]
@ 2013-03-02 20:51 Ben Hutchings
2013-03-04 4:17 ` MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE Ben Hutchings
0 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2013-03-02 20:51 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Kirill A. Shutemov, linux-mips
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
You implemented transparent huge pages for MIPS:
commit 970d032fec3f9687446595ee2569fb70b858a69f
Author: Ralf Baechle <ralf@linux-mips.org>
Date: Thu Oct 18 13:54:15 2012 +0200
MIPS: Transparent Huge Pages support
but THP also changed in 3.8:
commit fc9fe822f7112db23e51e2be3b886f5d8f0afdb6
Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Date: Wed Dec 12 13:50:51 2012 -0800
thp: copy_huge_pmd(): copy huge zero page
This added the requirement for pfn_pmd(), which is only defined if
CONFIG_64BIT && !CONFIG_CPU_VR41XX.
Ben.
--
Ben Hutchings
Computers are not intelligent. They only think they are.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-02 20:51 THP broken on MIPS-32 [3.8] Ben Hutchings
@ 2013-03-04 4:17 ` Ben Hutchings
2013-03-04 18:13 ` David Daney
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ben Hutchings @ 2013-03-04 4:17 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, David Daney
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
The MIPS implementation of transparent huge-pages (THP) is 64-bit only,
and of course also requires that the CPU supports huge-pages.
Currently it's entirely possible to enable THP in other configurations,
which then fail to build due to pfn_pmd() not being defined.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: David Daney <david.daney@cavium.com>
---
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -19,7 +19,7 @@ config MIPS
select HAVE_KRETPROBES
select HAVE_DEBUG_KMEMLEAK
select ARCH_BINFMT_ELF_RANDOMIZE_PIE
- select HAVE_ARCH_TRANSPARENT_HUGEPAGE
+ select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
select RTC_LIB if !MACH_LOONGSON
select GENERIC_ATOMIC64 if !64BIT
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-04 4:17 ` MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE Ben Hutchings
@ 2013-03-04 18:13 ` David Daney
2013-03-12 14:07 ` Ralf Baechle
2013-03-20 22:33 ` Sebastian Gottschall
2 siblings, 0 replies; 7+ messages in thread
From: David Daney @ 2013-03-04 18:13 UTC (permalink / raw)
To: Ben Hutchings, Ralf Baechle; +Cc: linux-mips, David Daney
On 03/03/2013 08:17 PM, Ben Hutchings wrote:
> The MIPS implementation of transparent huge-pages (THP) is 64-bit only,
> and of course also requires that the CPU supports huge-pages.
>
> Currently it's entirely possible to enable THP in other configurations,
> which then fail to build due to pfn_pmd() not being defined.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Cc: David Daney <david.daney@cavium.com>
This is correct.
Acked-by: David Daney <david.daney@cavium.com>
> ---
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -19,7 +19,7 @@ config MIPS
> select HAVE_KRETPROBES
> select HAVE_DEBUG_KMEMLEAK
> select ARCH_BINFMT_ELF_RANDOMIZE_PIE
> - select HAVE_ARCH_TRANSPARENT_HUGEPAGE
> + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
> select RTC_LIB if !MACH_LOONGSON
> select GENERIC_ATOMIC64 if !64BIT
> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-04 4:17 ` MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE Ben Hutchings
2013-03-04 18:13 ` David Daney
@ 2013-03-12 14:07 ` Ralf Baechle
2013-03-20 22:33 ` Sebastian Gottschall
2 siblings, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2013-03-12 14:07 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-mips, David Daney
Thanks, applied.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-04 4:17 ` MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE Ben Hutchings
2013-03-04 18:13 ` David Daney
2013-03-12 14:07 ` Ralf Baechle
@ 2013-03-20 22:33 ` Sebastian Gottschall
2013-03-20 23:12 ` David Daney
2 siblings, 1 reply; 7+ messages in thread
From: Sebastian Gottschall @ 2013-03-20 22:33 UTC (permalink / raw)
To: linux-mips
Am 04.03.2013 05:17, schrieb Ben Hutchings:
> The MIPS implementation of transparent huge-pages (THP) is 64-bit only,
> and of course also requires that the CPU supports huge-pages.
>
> Currently it's entirely possible to enable THP in other configurations,
> which then fail to build due to pfn_pmd() not being defined.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Cc: David Daney <david.daney@cavium.com>
> ---
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -19,7 +19,7 @@ config MIPS
> select HAVE_KRETPROBES
> select HAVE_DEBUG_KMEMLEAK
> select ARCH_BINFMT_ELF_RANDOMIZE_PIE
> - select HAVE_ARCH_TRANSPARENT_HUGEPAGE
> + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
> select RTC_LIB if !MACH_LOONGSON
> select GENERIC_ATOMIC64 if !64BIT
> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>
why? the mips32 74k platform (broadcom bcm4706 for instance) does
support huge pages. and some of these devices are also using highmem for
accessing more than 128mb ram (which is totally broken in all current
kernels too and causing filesystem corruptions)
i was able to fix the highmem problem using a patch which was submitted
but never taken into the mainline, but i just was able to get thb
partially to work on mips32. but i think it would be possible to support
this on mips32 as well. so why leaving it out?
regards,
Sebastian Gottschall
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-20 22:33 ` Sebastian Gottschall
@ 2013-03-20 23:12 ` David Daney
2013-03-21 0:16 ` Sebastian Gottschall
0 siblings, 1 reply; 7+ messages in thread
From: David Daney @ 2013-03-20 23:12 UTC (permalink / raw)
To: Sebastian Gottschall; +Cc: linux-mips
On 03/20/2013 03:33 PM, Sebastian Gottschall wrote:
> Am 04.03.2013 05:17, schrieb Ben Hutchings:
>> The MIPS implementation of transparent huge-pages (THP) is 64-bit only,
>> and of course also requires that the CPU supports huge-pages.
>>
>> Currently it's entirely possible to enable THP in other configurations,
>> which then fail to build due to pfn_pmd() not being defined.
>>
>> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
>> Cc: David Daney <david.daney@cavium.com>
>> ---
>> --- a/arch/mips/Kconfig
>> +++ b/arch/mips/Kconfig
>> @@ -19,7 +19,7 @@ config MIPS
>> select HAVE_KRETPROBES
>> select HAVE_DEBUG_KMEMLEAK
>> select ARCH_BINFMT_ELF_RANDOMIZE_PIE
>> - select HAVE_ARCH_TRANSPARENT_HUGEPAGE
>> + select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
>> && 64BIT
>> select RTC_LIB if !MACH_LOONGSON
>> select GENERIC_ATOMIC64 if !64BIT
>> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>>
> why? the mips32 74k platform (broadcom bcm4706 for instance) does
> support huge pages.
The hardware may support pages larger than 64K, but does the Linux
kernel? I think not.
> and some of these devices are also using highmem for
> accessing more than 128mb ram (which is totally broken in all current
> kernels too and causing filesystem corruptions)
> i was able to fix the highmem problem using a patch which was submitted
> but never taken into the mainline, but i just was able to get thb
> partially to work on mips32. but i think it would be possible to support
> this on mips32 as well. so why leaving it out?
As they say... Patches are welcome. If you get Linux HUGE pages working
for 32-bit kernels send a patch to enable the transparent variety as well.
David Daney
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE
2013-03-20 23:12 ` David Daney
@ 2013-03-21 0:16 ` Sebastian Gottschall
0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Gottschall @ 2013-03-21 0:16 UTC (permalink / raw)
To: linux-mips
>> why? the mips32 74k platform (broadcom bcm4706 for instance) does
>> support huge pages.
>
> The hardware may support pages larger than 64K, but does the Linux
> kernel? I think not.
>
>> and some of these devices are also using highmem for
>> accessing more than 128mb ram (which is totally broken in all current
>> kernels too and causing filesystem corruptions)
>> i was able to fix the highmem problem using a patch which was submitted
>> but never taken into the mainline, but i just was able to get thb
>> partially to work on mips32. but i think it would be possible to support
>> this on mips32 as well. so why leaving it out?
>
> As they say... Patches are welcome. If you get Linux HUGE pages working
> for 32-bit kernels send a patch to enable the transparent variety as well.
>
> David Daney
the first patch would be fix for the HIGHMEM problem. all recent kernels
do support HIGHMEM for mips32 based devices, but in fact its not
working. all patches i made which is required to get it to work is
available at svn://svn.dd-wrt.com/DD-WRT for all recent kernels.
for mips32 HIGHMEM support you need to apply the following patch
http://patchwork.linux-mips.org/patch/3634/
this patch has a small typo, which needs to be fixed but its very easy
to merge to all current kernels. without it, highmem enabled devices
will cause memory corruptions. especially on filesystems wrong data will
be written and so on.
i will try to test my older thb patch with the new highmem fixes
together next and i hope it works. in the meantime, please review the
patchlink above
Sebastian
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-21 0:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-02 20:51 THP broken on MIPS-32 [3.8] Ben Hutchings
2013-03-04 4:17 ` MIPS: Add dependencies for HAVE_ARCH_TRANSPARENT_HUGEPAGE Ben Hutchings
2013-03-04 18:13 ` David Daney
2013-03-12 14:07 ` Ralf Baechle
2013-03-20 22:33 ` Sebastian Gottschall
2013-03-20 23:12 ` David Daney
2013-03-21 0:16 ` Sebastian Gottschall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.