From owner-freebsd-arch@FreeBSD.ORG Wed May 31 20:19:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F72D16B8CD; Wed, 31 May 2006 20:19:07 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CD3543D4C; Wed, 31 May 2006 20:19:07 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.250.2] (217-162-174-115.dclient.hispeed.ch [217.162.174.115]) by elvis.mu.org (Postfix) with ESMTP id 28FC41A4E48; Wed, 31 May 2006 13:19:05 -0700 (PDT) Message-ID: <447DFA0C.20207@FreeBSD.org> Date: Wed, 31 May 2006 22:18:20 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: rookie@gufi.org References: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> In-Reply-To: <3bbf2fe10605311156p7e629283r34d22b368877582d@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-x86@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [patch] Adding optimized kernel copying support - Part III X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 20:19:09 -0000 Hello Attilio, Attilio Rao wrote: > Hi, > this is the last release which is rather finished and complete for the > project. > > I tested for consistency for a long time and the FPU handling > mechanism seems very robust so as copyin/copyout do. Nice work. Any chance you could also port it to amd64? :-) > What I'm looking for, at this point, are testers for peroformances. > What is proposed in the patch is one of the better solutions for UP > archs (not running with PREEMPTION) but more general cases might be > handled with time. Does that mean it won't work with SMP and PREEMPTION? > I hope that somebody wants to play with him, giving suggestions and > doing different benchmarks. What kind of performance improvements did you see in your benchmarks? > The code can be found here: > http://users.gufi.org/~rookie/works/patches/xmmcopy_6_1.diff > > and is for RELEASE_6_1 in order to have a wider range of testers (a > diff against HEAD will be available ASAP). > > Please keep in mind that this is not a complete rip of DflyBSD code > beacause it is different in a lot of parts. > > For any kind of tecnical questions, please mail me. 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. 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. -- Suleiman