From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 30 19:46:11 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBA6916A420 for ; Mon, 30 Jan 2006 19:46:11 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D21443D49 for ; Mon, 30 Jan 2006 19:46:11 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: by wproxy.gmail.com with SMTP id 50so1032709wri for ; Mon, 30 Jan 2006 11:46:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=izjIEF9lSZlgo6io+quU6TuHk5L/5yKe1f83I3gM+kSnefydr5cC4ZCO6rjwJbQI1F6ueRvIj4LiZuNwa0AmK6yhCMX+C9jaHOKbSkP9pkEhk3bLgwoldGhqaF1XRqBuhrJQMDKyoL6WwKHlRDm9M+QhydyTAhdlviA7EpYwE9w= Received: by 10.65.54.2 with SMTP id g2mr1724423qbk; Mon, 30 Jan 2006 11:46:10 -0800 (PST) Received: by 10.65.124.18 with HTTP; Mon, 30 Jan 2006 11:46:10 -0800 (PST) Message-ID: <67beabb0601301146h6c5034fao998bf573f1e89613@mail.gmail.com> Date: Mon, 30 Jan 2006 11:46:10 -0800 From: Bharma Ji To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How to pin a userland page in memory(avoid copyin and copyout) 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: Mon, 30 Jan 2006 19:46:12 -0000 Hi I am trying to explore the option avoiding copyin and copyout when mode switches from user to kernel and vice versa. One way to achieve this, as I understand, is to make the memory address (which contain the data to be copied) non pageable. Then just pass the addresses to the kernel and the data will be used directly from the userland page. Is there already some example code / standard way to do this? Also is there any way one can determine the amount of time / performance hi= t (CPU %)that happening on a given process due to the copyin and copyout. I want to understand how much performance gain one can gain if I am able to remove copyin/copyout.