android_kernel_xiaomi_sm8350/arch/powerpc
Anton Blanchard 789c299ca2 powerpc: Improve 64bit copy_tofrom_user
Here is a patch from Paul Mackerras that improves the ppc64 copy_tofrom_user.
The loop now does 32 bytes at a time and as well as pairing loads and stores.

A quick test case that reads 8kB over and over shows the improvement:

POWER6: 53% faster
POWER7: 51% faster

#define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>

#define BUFSIZE (8 * 1024)
#define ITERATIONS 10000000

int main()
{
	char tmpfile[] = "/tmp/copy_to_user_testXXXXXX";
	int fd;
	char *buf[BUFSIZE];
	unsigned long i;

	fd = mkstemp(tmpfile);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	if (write(fd, buf, BUFSIZE) != BUFSIZE) {
		perror("open");
		exit(1);
	}

	for (i = 0; i < 10000000; i++) {
		if (pread(fd, buf, BUFSIZE, 0) != BUFSIZE) {
			perror("pread");
			exit(1);
		}
	}

	unlink(tmpfile);

	return 0;
}

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-02-17 14:03:16 +11:00
..
boot zlib: Fix build of powerpc boot wrapper 2010-01-13 16:13:39 -08:00
configs powerpc: Reduce differences between pseries and ppc64 defconfigs 2010-02-09 13:56:06 +11:00
include/asm powerpc: Use lwsync for acquire barrier if CPU supports it 2010-02-17 14:03:16 +11:00
kernel powerpc: Convert global "BAD" interrupt to per cpu spurious 2010-02-17 14:02:49 +11:00
kvm KVM: powerpc: Show timing option only on embedded 2010-01-25 12:26:36 -02:00
lib powerpc: Improve 64bit copy_tofrom_user 2010-02-17 14:03:16 +11:00
math-emu
mm powerpc: Convert open coded native hashtable bit lock 2010-02-17 14:03:15 +11:00
oprofile tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
platforms powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
sysdev powerpc: Remove whitespace in irq chip name fields 2010-02-17 14:02:48 +11:00
xmon powerpc: Mark some variables in the page fault path __read_mostly 2010-02-03 17:39:48 +11:00
Kconfig powerpc: Increase NR_IRQS Kconfig maximum to 32768 2010-02-03 17:39:50 +11:00
Kconfig.debug Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
Makefile powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00