2.5.46 add original copy_ro/from_user for i386 and support PenPro PenII
PATCH 1/1 2.5.46 add original copy_ro/from_user for i386 and support PenPro PenII
This is revised version from my previous patch, adding original copy_user.
In addition, I changed one line in Kconfig, remove M585MMX and add M686 because I run new copy-user on my PentiumMMX but had no improvement, however PenII/PenPro likely to have improvement from new copy_user function.
Athlon is ignored in the current kernel from 2.5.45 but you could use CONFIG_M686 to try new copy_user.
Akira
arch/i386/Kconfig +2 -2
@@ -263,9 +263,9 @@ depends on MK7 || MPENTIUM4 || MPENTIUMIII || M686 || M586MMX default y -config X86_INTEL_USERCOPY +config X86_USE_USERCOPY_686 bool - depends on MPENTIUM4 || MPENTIUMIII || M586MMX + depends on MPENTIUM4 || MPENTIUMIII || M686 default y config X86_USE_PPRO_CHECKSUM
arch/i386/kernel/cpu/intel.c +0 -25
@@ -14,13 +14,6 @@static int disable_P4_HT__initdata =0 ;extern int trap_init_f00f_bug (void ); -#ifdef CONFIG_X86_INTEL_USERCOPY -/* -* Alignment at which movsl is preferred for bulk memory copies. -*/ -struct movsl_mask movsl_mask; -#endif -/* * Early probe support logic for ppro memory erratum #50 *
@@ -356,24 +349,6 @@/* Work around errata */ Intel_errata_workarounds (c); - -#ifdef CONFIG_X86_INTEL_USERCOPY -/* -* Set up the preferred alignment for movsl bulk memory moves -*/ -switch (c->x86) { -case 4 :/* 486: untested */ -break ; -case 5 :/* Old Pentia: untested */ -break ; -case 6 :/* PII/PIII only like movsl with 8-byte alignment */ - movsl_mask.mask =7 ; -break ; -case 15 :/* P4 is OK down to 8-byte alignment */ - movsl_mask.mask =7 ; -break ; - } -#endif }
arch/i386/lib/usercopy.c +66 -6
107 lines not on this page · raw message
On Tue, 05 Nov 2002 09:36:48 -0500
Akira Tsukamoto <[email protected]> mentioned:
Quoted 9 lines
This is revised version from my previous patch, adding original
copy_user.In addition, I changed one line in
Kconfig, remove M585MMX and add M686 because I run new copy-user on my PentiumMMX but had no improvement, however PenII/PenPro likely to have improvement from newcopy_userfunction.Athlon is ignored in the current kernel from 2.5.45 but you could use
CONFIG_M686to try newcopy_user.
For arhlon, to try the new copy_user,
I run the Taka's socket benchmark program between CONFIG_M686 and K7.
http://www.suna-asobi.com/~akira-t/linux/netio-bench/netio2.c
CONFIG_MK7
(off:100, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.117 seconds at 342.9 Mbytes/sec (off:104, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.114 seconds at 350.1 Mbytes/sec (off:108, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.115 seconds at 347.9 Mbytes/sec (off:112, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.113 seconds at 354.8 Mbytes/sec (off:116, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.112 seconds at 358.1 Mbytes/sec (off:120, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.113 seconds at 354.2 Mbytes/sec
CONFIG_M686
(off:100, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.090 seconds at 445.1 Mbytes/sec (off:104, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.090 seconds at 442.4 Mbytes/sec (off:108, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.089 seconds at 447.2 Mbytes/sec (off:112, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.091 seconds at 438.7 Mbytes/sec (off:116, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.091 seconds at 440.7 Mbytes/sec (off:120, size:0x800000)
send/recv: copied 40.0 Mbytes in 0.090 seconds at 442.7 Mbytes/sec
It looks like improving, but it could be X86_L1_CACHE_SHIFT 6/5 problem that I post it previously.
Signature · 1 line
Akira Tsukamoto <[email protected], [email protected]>
On Tue, 05 Nov 2002 09:36:48 -0500
Akira Tsukamoto <[email protected]> mentioned:
Quoted 6 lines
This is revised version from my previous patch, adding original
copy_user.In addition, I changed one line in
Kconfig, remove M585MMX and add M686 because I run new copy-user on my PentiumMMX but had no improvement, however PenII/PenPro likely to have improvement from newcopy_userfunction.
I gathered benchmark results for PentiumMMX.
They confirm that my patch improves the speed.
I run the Taka's socket benchmark program on PentiumMMX with CONFIG-M586MMX.
http://www.suna-asobi.com/~akira-t/linux/cleanup-copy-user-1/netio586mmx.c
Without my patch on 2.5.46:
(off:0, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.381 seconds at 13.1 Mbytes/sec (off:1, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.488 seconds at 10.2 Mbytes/sec (off:2, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.493 seconds at 10.1 Mbytes/sec (off:3, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.489 seconds at 10.2 Mbytes/sec (off:4, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.381 seconds at 13.1 Mbytes/sec (Entire log is here,
http://www.suna-asobi.com/~akira-t/linux/cleanup-copy-user-1/586MMX-PenMMX-no-patch.log)
With my patch on 2.5.46:
(off:0, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.380 seconds at 13.2 Mbytes/sec (off:1, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.385 seconds at 13.0 Mbytes/sec (off:2, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.385 seconds at 13.0 Mbytes/sec (off:3, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.384 seconds at 13.0 Mbytes/sec (off:4, size:0x100000)
send/recv: copied 5.0 Mbytes in 0.381 seconds at 13.1 Mbytes/sec (Entire log is here,
http://www.suna-asobi.com/~akira-t/linux/cleanup-copy-user-1/586MMX-PenMMX-with-patch.log)
I appreciate if somebody could try on 386 or 486.
I don't have them right now.
Cheers,
Akira