Date: Wed, 31 May 2006 22:29:34 +0200 From: "Attilio Rao" <asmrookie@gmail.com> To: "Suleiman Souhlal" <ssouhlal@freebsd.org>, freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: [patch] Adding optimized kernel copying support - Part III Message-ID: <3bbf2fe10605311329h7adc1722j9088253515e0265b@mail.gmail.com> In-Reply-To: <447DFA0C.20207@FreeBSD.org> References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> <447DFA0C.20207@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2006/5/31, Suleiman Souhlal <ssouhlal@freebsd.org>: > Hello Attilio, Hello Suleiman, > Nice work. Any chance you could also port it to amd64? :-) Not in the near future, I think. :P > Does that mean it won't work with SMP and PREEMPTION? Yes it will work (even if I think it needs more testing) but maybe would give lesser performances on SMP|PREEMPTION due to too much traffic on memory/cache. For this I was planing to use non-temporal instructions (obviously benchmarks would be very appreciate). > What kind of performance improvements did you see in your benchmarks? I'm sorry but I didn't benchmarked on P4 (with xmm instructions). On P3, using integer copies, with dd and time I measured about 2% increasing, I hope more on P4 (and you might add xmm usage too). > I wonder if we could get rid of the memcpy_vector (copyin/copyout_vector > before this patch), bzero_vector and bcopy_vector function pointers and > do boot-time patching of the callers to the right version Mmm, please note that on i386, at boot time (I've never studied that code) it seems requiring of vectorized version of bcopy/bzero. memcpy_vector that I introduced is used in slightly a different way from the other so I don't think it's so simple applying your idea to these. > I have a linux-inspired proof-of-concept demo of this boot-time patching > at http://people.freebsd.org/~ssouhlal/testing/bootpatch-20060527.diff. > It prefetches the next element in the *_FOREACH() macros in sys/queue.h. > The patching that it does is to use PREFETCH instruction instead of > PREFETCHNTA if the cpu is found to support SSE2. It would be very appreciate to have it MI (yes, I mean MD + MI structure :PP) Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10605311329h7adc1722j9088253515e0265b>