From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 24 16:02:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2DED1065675; Fri, 24 Jul 2009 16:02:36 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6B68FC14; Fri, 24 Jul 2009 16:02:36 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.43,265,1246831200"; d="scan'208";a="278218390" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 24 Jul 2009 18:02:34 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id ACC691B0765; Fri, 24 Jul 2009 18:02:34 +0200 (CEST) Date: Fri, 24 Jul 2009 18:02:34 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: John Baldwin Message-ID: In-Reply-To: <200907240747.45738.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Alexey Shuvaev , freebsd-hackers@freebsd.org Subject: Re: checking number of parallel ports installed and their port adresses X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 16:02:37 -0000 well i'm performing a large number of port accesses since the data gets transferred bit-by-bit over a single parallel port pin with another pin acting as clock. so transfering 256 kbyte of data means i'm doing >= 256*1024*8*2 ioctls. i guess when transfering data on a nibble, byte, word or dword basis the overhead isn't that dramatic. alex John Baldwin schrieb am 2009-07-24: > On Friday 24 July 2009 6:42:34 am Alexander Best wrote: > > thanks for the hint. > > if spent a bit of time and turned the in/out opcodes to ppi ioctls. > > actually > i > > was very surprised about the results since you said the overhead > > wouldn't be > > that big. > > uploading a 256 kbyte file i got the following results: > > using ppi: 17.120 seconds > > using in/out opcodes: 8.001 seconds > > so i think i'll rather stick to my old inline assembly code even if > > it can't > > be considered nice programming style, but the ppi overhead isn't > > something i > > can cope with in my app. > Hmmm, that is a bit much. Though I do suppose you are incurring a > user -> > kernel -> user transition for each I/O access.