From owner-freebsd-arch@FreeBSD.ORG Mon Jan 3 23:16:16 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D26C0106566B for ; Mon, 3 Jan 2011 23:16:16 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f68.google.com (mail-ww0-f68.google.com [74.125.82.68]) by mx1.freebsd.org (Postfix) with ESMTP id 66A3F8FC08 for ; Mon, 3 Jan 2011 23:16:16 +0000 (UTC) Received: by wwj40 with SMTP id 40so5055569wwj.7 for ; Mon, 03 Jan 2011 15:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=aPRBEPjmtNdPIS1MWoJbXWl10uwjgFk9dl2Je9uDp3w=; b=X6VARJP+bvhiJnG47d42N/VmRlsJKjj95+bGkII8kIvAz8q2bZi2Qdbdl3UhUt/E8S NdW4FEBJlT6TOPNKmrfSyGtniu2Kl74EZxyVcqWHQCQzFQ5QNczCvOA9As/vA4Muju+V 5V5zkms+rDPDfX67drV3KiahmZAh5CymMbO6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=iMDv1r8T8FshuU6TmYNzCX5jHQKG8LfX6D1A+z70NIqk92ICu1VIgwTmWr5JkdzFZf PI2Ia9MW0ZBsbymsEIaS4E09LUiFOe0kCFtZBeAUOcZtB6u+bDwsLcHAxgTEP0Od8+vJ a4fQyLRCUn57VWA0Gzz24FSj5zdtnYymq5NyY= MIME-Version: 1.0 Received: by 10.216.78.146 with SMTP id g18mr1748871wee.1.1294095749533; Mon, 03 Jan 2011 15:02:29 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.254.226 with HTTP; Mon, 3 Jan 2011 15:02:29 -0800 (PST) In-Reply-To: <20110103210223.GV2973@elvis.mu.org> References: <20110103210223.GV2973@elvis.mu.org> Date: Mon, 3 Jan 2011 15:02:29 -0800 X-Google-Sender-Auth: LdQPSyn9neQWrmoVXijeUCpBM7U Message-ID: From: Garrett Cooper To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: Linux kernel compatability 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: Mon, 03 Jan 2011 23:16:17 -0000 On Mon, Jan 3, 2011 at 1:02 PM, Alfred Perlstein wrote= : > * Jeff Roberson [110103 12:51] wrote: >> Hello Folks, >> >> Some of you may have seen my infiniband work proceed in svn. =A0It is co= ming >> to a close soon and I will be integrating it into current. =A0I have a f= ew >> patches to the kernel to send for review but I wanted to bring up the KP= I >> wrapper itself for discussion. >> >> The infiniband port has been done by creating a 10,000 line KPI >> compatability layer. =A0With this layer the vast majority of the driver = code >> runs unmodified. =A0The exceptions are anything that interfaces with skb= s >> and most of the code that deals with network interfaces. >> >> Some examples of things supported by the wrapper: >> >> atomics, types, bitops, byte order conversion, character devices, pci >> devices, dma, non-device files, idr tables, interrupts, ioremap, hashes, >> kobjects, radix trees, lists, modules, notifier blocks, rbtrees, rwlock, >> rwsem, semaphore, schedule, spinlocks, kalloc, wait queues, workqueues, >> timers, etc. >> >> Obviously a complete wrapper is impossible and I only implemented the >> features that I needed. =A0The build is accomplished by pointing the lin= ux >> compatible code at sys/ofed/include/ which has a simulated linux kernel >> include tree. =A0There are some config(8) changes to help this along as >> well. >> >> I have seen that some attempt at similar wrappers has been made elsewher= e. >> I wonder if instead of making each one tailored to individual components= , >> which mostly seem to be filesystems so far, should we put this in a >> central place under compat somewhere? =A0Is this project doomed to be ti= ed >> to a single consumer by the specific nature of it? >> >> Other comments or concerns? > > I think this is really cool. =A0Brilliant actually. > > What do you think about proposing it on some standards list as a > cross unix KPI? =A0That way we can see upcoming changes and maybe > have a say in pushing back on gratuitous changes that would break > our clients? That would be really nice, but I doubt people could agree on a single set of KPIs for everything and given the rate of progress with opengroup, I don't think it will fly (in particular with our and Linux's rate of development). Thankfully some of stuff (from what I've seen) is easy to port back and forth, but it varies depending on how tied the code is to the OS of course :(. Thanks, -Garrett