From owner-freebsd-questions@FreeBSD.ORG Sun Aug 3 21:13:02 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F69106567A for ; Sun, 3 Aug 2008 21:13:02 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4D10F8FC1B for ; Sun, 3 Aug 2008 21:13:01 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so1515001mue.3 for ; Sun, 03 Aug 2008 14:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=SkBIHRWQ7ev8K3Q2T5Jea6TEl1tdqXcsqFdl9YLrL5U=; b=MDSHVBGMlS7sIbOTwHobSpoJj/e0utvl9HO4I//swCQ4DmIc0Q7UV4r+it/qyQRiLC H/FjlTpu0pVhPa2+/M3GrC8C8vr5xqvusSsD0WfNR1qXvFpSbo4VErls3TCg3BDDD1Ey +KdTT3al9Pr2UkmAsEpDjacBLaCM1EY/vC4dM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=RPRnsBC/gHpsRSZI4epKTcPcnH76tiskPS2pQP+FJDgNKFz4ie78qa7B/FmW7JHr5i fMys2EQouEiN40Gx9FG6MEL/DuViv94o5YmSzruDpAulfqCvUpzK7kUUDBMU1aPc58ey NF1mMlHoLXjhy1Fpd1k5aSJGBaeGWH7Rnvkwk= Received: by 10.103.6.6 with SMTP id j6mr5093260mui.89.1217796488050; Sun, 03 Aug 2008 13:48:08 -0700 (PDT) Received: from hunin.home ( [144.85.139.232]) by mx.google.com with ESMTPS id j10sm522296mue.6.2008.08.03.13.48.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 03 Aug 2008 13:48:07 -0700 (PDT) Message-Id: <242E2E48-CAA3-44FB-8AC9-A0A616D4F72F@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Sun, 3 Aug 2008 22:48:05 +0200 X-Mailer: Apple Mail (2.926) Subject: SMP aware programming X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2008 21:13:02 -0000 Hi, I'm about to port ModelNet (a large-scale internet emulator) from FreeBSD 4 to FreeBSD 7. It is implemented as a module. Well, changing couple of headers and structs will probably solve the thing, but I would like to make it SMP aware. Since it emulates a lot of nodes, each of which is doing some processing, I would like to "group" them, so ones are executing on one core, other on second and so on... Can someone give me some pointers to some good tutorial, text, documentation? I know about multiprogramming, but I never did anything in a kernel. Thank, Nikola