From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 4 09:27:07 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 E77781065674 for ; Tue, 4 Aug 2009 09:27:07 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 7698C8FC0A for ; Tue, 4 Aug 2009 09:27:07 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by fxm6 with SMTP id 6so1823721fxm.43 for ; Tue, 04 Aug 2009 02:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=odhsg175utUGVg8sp75fDUmoO5wOMTW1SrirpPUuP+A=; b=xeX4ct+vX7VMIrhgqJyFj4N0eH8+WLvGcXzFMNq6R1n+3zbms+WHlGv2aXYXLwi465 of8QlbBwzl+LGQjAv50unmxYtt9/lb/UR7d7FyR+T0XvqdOfdqVmtK/J9ayEkcl/JpSR sbuflCf3Y3K3UU9d0su6Zv16Qkke6j+DXo9Pg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PrCcNUnq8v1+C0jeIcr/RKnhE558DX879YCfpKFILa06wFhbRnKkorzkVP5N//CN8g TdKLX3KKiocT7Wrm7LcVoCwwphe+Lmu8aenCOr/EZeMfwO1g27PrcikzNAkc9c/zgvP+ uhMmWzyI6YC8G//a9DOrqMvlpp136JkXTAcv0= MIME-Version: 1.0 Received: by 10.204.71.68 with SMTP id g4mr6960247bkj.135.1249378026479; Tue, 04 Aug 2009 02:27:06 -0700 (PDT) In-Reply-To: <200908040138.14743.max@love2party.net> References: <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com> <86k51k4kvl.fsf@ds4.des.no> <86fxc84ksj.fsf@ds4.des.no> <200908040138.14743.max@love2party.net> Date: Tue, 4 Aug 2009 09:27:06 +0000 Message-ID: <319cceca0908040227hf9a0f92jbf05b11e9f974994@mail.gmail.com> From: Maslan To: Max Laier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: sosend() and mbuf 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: Tue, 04 Aug 2009 09:27:08 -0000 man kthread says: The kthread_create() function is used to create a kernel thread. The new thread shares its address space with process 0, the swapper process, a= nd runs in kernel mode only. However, when i checked the pid & tid of the new created thread it was not the same as the parent nor as the proc0 & thread0 simple printf() gives: swap procid=3D0, threadid=3D0 procid=3D1680, threadid=3D100089 procid=3D1681, threadid=3D100090 <--- created by kthread_create() 2009/8/3 Max Laier : > On Tuesday 04 August 2009 00:03:40 Dag-Erling Sm=F8rgrav wrote: >> Dag-Erling Sm=F8rgrav writes: >> > One thing that springs to mind is that kern_open() will dereference >> > td->td_proc, and AFAIK kthread_create() does not associate the thread >> > with a process. >> >> This is wrong, and contradicts what I wrote further down. Just ignore >> it. > > IIRC, kernel threads don't have root. > > -- > /"\ Best regards, | mlaier@freebsd.org > \ / Max Laier | ICQ #67774661 > X http://pf4freebsd.love2party.net/ | mlaier@EFnet > / \ ASCII Ribbon Campaign | Against HTML Mail and News > >