From owner-freebsd-arch@FreeBSD.ORG Tue Jan 4 05:00:23 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 1091E106564A for ; Tue, 4 Jan 2011 05:00:23 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id C7CE78FC12 for ; Tue, 4 Jan 2011 05:00:22 +0000 (UTC) Received: by gwj21 with SMTP id 21so6864070gwj.13 for ; Mon, 03 Jan 2011 21:00:22 -0800 (PST) Received: by 10.236.105.161 with SMTP id k21mr1787681yhg.87.1294117221977; Mon, 03 Jan 2011 21:00:21 -0800 (PST) Received: from [10.0.1.198] ([72.253.42.56]) by mx.google.com with ESMTPS id 55sm12833413yhl.37.2011.01.03.21.00.18 (version=SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 21:00:20 -0800 (PST) Date: Mon, 3 Jan 2011 19:03:01 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Alexander Kabaev In-Reply-To: <20110103220153.69cf59e0@kan.dnsalias.net> Message-ID: References: <20110103220153.69cf59e0@kan.dnsalias.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Tue, 04 Jan 2011 05:00:23 -0000 On Mon, 3 Jan 2011, Alexander Kabaev wrote: > On Mon, 3 Jan 2011 10:31:24 -1000 (HST) > Jeff Roberson wrote: > >> Hello Folks, >> >> Some of you may have seen my infiniband work proceed in svn. It is >> coming to a close soon and I will be integrating it into current. I >> have a few patches to the kernel to send for review but I wanted to >> bring up the KPI wrapper itself for discussion. >> >> The infiniband port has been done by creating a 10,000 line KPI >> compatability layer. With this layer the vast majority of the driver >> code runs unmodified. The exceptions are anything that interfaces >> with skbs 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. The build is accomplished by pointing the >> linux compatible code at sys/ofed/include/ which has a simulated >> linux kernel include tree. There are some config(8) changes to help >> this along as well. >> >> I have seen that some attempt at similar wrappers has been made >> elsewhere. 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? Is >> this project doomed to be tied to a single consumer by the specific >> nature of it? >> >> Other comments or concerns? >> >> Thanks, >> Jeff > > > This probably will go against popular opinion here, but having 10k > linux emulation layer that _almost_ work in the tree will be an > unfortunate event and will do more damage to FreeBSD as a platform than > good in the long run. I would rather see this code never hit main > repository. I would argue that the layer works very well for infiniband. Much better than almost. It is only almost complete in that there is no need for me to implement features that we're not using. I am interested in hearing your other concerns however. Thanks, Jeff > > -- > Alexander Kabaev >