Date: Mon, 19 Aug 2002 13:59:02 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Bruce Evans <bde@zeta.org.au> Cc: "Semen A. Ustimenko" <semenu@FreeBSD.ORG>, <freebsd-current@FreeBSD.ORG>, Maxim Konovalov <maxim@FreeBSD.ORG>, Robert Watson <rwatson@FreeBSD.ORG>, <dg@FreeBSD.ORG> Subject: Re: sendfile() change (Was: Re: cvs commit: src/sys/kern uipc_syscalls.c) Message-ID: <200208192059.g7JKx2j4079175@apollo.backplane.com> References: <20020820040605.N20882-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:> call VOP_GETPAGES() on a block of pages instead of just one. I'm :> guessing that is not being done because it's about 100 lines of code :> to do it right. It's easier just to call vn_rdwr() and let the :> system do the clustering. : :This argument seems to apply to exec_map_first_pages() too. It does :its own blocking to get up to VM_INITIAL_PAGEIN (normally 16) pages :using only about 50 lines of code, but does this slightly wrong. It :doesn't honor the device limit of si_iosize_max, unlike filesystem :code. This used to break exec on zip drives (si_iosize_max used to :be 32K, but VM_INITIAL_PAGEIN pages is 64K bytes on i386's). : :Bruce Yes, it definitely applies. The vm_page_grab() can be replaced with a vm_page_lookup() sequence similar to what we find in do_sendfile(), and everything inside the 'if ((ma[0]->valid & ...' can be ripped out and replaced with a single vn_rdwr() call, if (error) test, and then loop back up to the vm_page_lookup(). There are enough parallels between the sendfile code and the exec_map_first_page() code that a significant portion of both procedures could be shifted to its own procedure which does the read-ahead and returns a single, valid, busied page. I am not volunteering to do this, though, I already have a full plate. -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208192059.g7JKx2j4079175>