Skip site navigation (1)Skip section navigation (2)
Date:      25 Feb 2003 16:09:25 -0800
From:      Arun Sharma <arun.sharma@intel.com>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        freebsd-ia64@FreeBSD.ORG
Subject:   Re: Slow loading of the kernel from efifs ?
Message-ID:  <u3cmbnbre.fsf@unix-os.sc.intel.com>
In-Reply-To: <20030225213120.GA49775@ns1.xcllnt.net>
References:  <200302251946.h1PJktr26424@unix-os.sc.intel.com> <20030225213120.GA49775@ns1.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar <marcel@xcllnt.net> writes:
> There may be some low-hanging fruit or even some genuine bugs that
> may improve this without much work, but I haven't looked at it.

Low hanging fruits first. The attached patch reduced the time required
to load the kernel from about 65s to 3s on the Tiger4.

        -Arun

--- sys/boot/efi/libefi/efifs.c-	Tue Feb 25 22:57:45 2003
+++ sys/boot/efi/libefi/efifs.c	Tue Feb 25 22:58:53 2003
@@ -112,6 +112,8 @@
 	return 0;
 }
 
+#define EFI_BLOCK_SIZE (1024 * 1024)
+
 static int
 efifs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
 {
@@ -123,8 +125,8 @@
 	bufp = buf;
 	while (size > 0) {
 		sz = size;
-		if (sz > 8192)
-			sz = 8192;
+		if (sz > EFI_BLOCK_SIZE)
+			sz = EFI_BLOCK_SIZE;
 		status = file->Read(file, &sz, bufp);
 		twiddle();
 		if (EFI_ERROR(status))
@@ -150,8 +152,8 @@
 	bufp = buf;
 	while (size > 0) {
 		sz = size;
-		if (sz > 8192)
-			sz = 8192;
+		if (sz > EFI_BLOCK_SIZE)
+			sz = EFI_BLOCK_SIZE;
 		status = file->Write(file, &sz, bufp);
 		twiddle();
 		if (EFI_ERROR(status))


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?u3cmbnbre.fsf>