aboutsummaryrefslogtreecommitdiff
path: root/net/wol.c
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>2024-04-09 14:14:34 +0200
committerTom Rini <trini@konsulko.com>2024-04-17 17:06:01 -0600
commit7c665e151246cf8b5072ca4f1916f8ed0fa8565c (patch)
tree7be34e4f69ee91a85ae0086e248c07908b3dd152 /net/wol.c
parent28a766ebf16e1f702dd0a9dc74ad71fd81e57e0f (diff)
downloadu-boot-7c665e151246cf8b5072ca4f1916f8ed0fa8565c.zip
u-boot-7c665e151246cf8b5072ca4f1916f8ed0fa8565c.tar.gz
u-boot-7c665e151246cf8b5072ca4f1916f8ed0fa8565c.tar.bz2
tools: copyfile: use 64k instead of 512 buffer
This is a trivial but significant optimization: mkimage took >200ms (and 49489 writes (of which 49456 512)), now it takes 110ms (and 419 writes (of which 386 64k)). sendfile is much more appropriate for this and is done in one syscall, but doesn't bring any significant speedups over 64k r/w at the 13M size ranges, so there's no need to introduce #if __linux__ while((size = sendfile(fd_dst, fd_src, NULL, 128 * 1024 * 1024)) > 0) ; if(size != -1) { ret = 0; goto out; } #endif Also extract the buffer size to a macro. Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Diffstat (limited to 'net/wol.c')
0 files changed, 0 insertions, 0 deletions