From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 28 15:38:47 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C39D016A501 for ; Fri, 28 Jul 2006 15:38:47 +0000 (UTC) (envelope-from mag@intron.ac) Received: from smtp.263.net (263.net.cn [211.150.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5589B43D4C for ; Fri, 28 Jul 2006 15:38:44 +0000 (GMT) (envelope-from mag@intron.ac) Received: from origin.intron.ac (unknown [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 592BDF17BC for ; Fri, 28 Jul 2006 23:38:51 +0800 (CST) X-KSVirus-check: 0 References: <1153994127.11460@origin.intron.ac> <20060728093647.GA32168@stud.fit.vutbr.cz> In-Reply-To: <20060728093647.GA32168@stud.fit.vutbr.cz> From: "Intron" To: Divacky Roman Date: Fri, 28 Jul 2006 23:35:02 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <1154101122.39118@origin.intron.ac> Cc: alexander@leidinger.net, freebsd-emulation@freebsd.org Subject: Re: My Linux AIO Implementation Calling for Test X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 15:38:47 -0000 Divacky Roman wrote: > On Thu, Jul 27, 2006 at 05:44:01PM +0800, Intron wrote: >> Download: http://ftp.intron.ac/tmp/linux_aio-20060727.tar.bz2 >> >> Based on FreeBSD aio(4), my patch set has implemented 5 system calls >> of Linux Asynchronous Input/Output: io_setup(2), io_destroy(2), >> io_getevents(2), io_submit(2) and io_cancel(2). It only works with >> 7.0-CURRENT. > > havent studied details but here are my suggestions: > > 1) please conform to style(9) Do you refer to "if" directive and line width? I will obey style(9) as possible, keeping most of legibility. > > 2) please use LMSG, ARGS macros to be conform with the rest of the linuxolator I will. > > 3) why do you use uma directly? linuxolator uses malloc from within M_LINUX. I > personally dont mind using uma zone directly but if there is a reason for it. The function set zone(9) is good at managing (allocating/freeing) small memory block frequently. It obtains big memory block from VM in batches and re-allocate small memory block (e.g. structure/union of C) to caller. When it re-allocates small memory block frequently, in contrast VM page mapping table (i.e. GDT and LDT on x86 and x86_64) will NOT be frequently modified, which can relax VM. My code manages many C structures (Linux AIO context and Linux AIO request). So I believe zone(9) is more fit for my code than malloc(9). If you have different opinion, I will respect you. > > thnx for your contribution! > > roman ------------------------------------------------------------------------ From Beijing, China