/gallery

Some *nix hacking

07 Mar, 2011
0 Comments

So, Since liferea and Firefox both tend to be somewhat sluggish under high IO load, even when they shouldn't be doing much out of it, I figured I'd get it sorted.

And while doing so, I'd also toss in the fix for Adobe Flash that Linus Torvalds posted in the Fedora bugzilla (#638477) earlier.
#include <sys/types.h> void *memcpy(void *dst, const void *src, size_t size) { void *orig = dst; asm volatile("rep ; movsq" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size >> 3) :"memory"); asm volatile("rep ; movsb" :"=D" (dst), "=S" (src) :"0" (dst), "1" (src), "c" (size & 7) :"memory"); return orig; } int fsync(int fd) { return 0; } int fdatasync(int fd) { return 0; } int msync(void *addr, size_t length, int flags) { return 0; }
License? The sync parts are trivial and not licensable. The Linus part isn't much worse.
Remember, if it eats your data, you can pet it.
gcc -O2 -c crappy.c ld -G crappy.o -o crappy.so LD_PRELOAD=`pwd`/crappy liferea & disown LD_PRELOAD=`pwd`/crappy firefox4 & disown

« Words escape me sometimes  —  Early spring »

0 Responses to Some *nix hacking

  1. There are currently no comments.

Leave a Reply