From owner-freebsd-scsi@FreeBSD.ORG Thu Nov 8 08:25:20 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2ED216A418 for ; Thu, 8 Nov 2007 08:25:20 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 88E3713C4A3 for ; Thu, 8 Nov 2007 08:25:20 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id lA88P5LJ073498; Thu, 8 Nov 2007 01:25:06 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4732C7DC.60902@samsco.org> Date: Thu, 08 Nov 2007 01:25:00 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Ivan Voras References: <47300ADE.5070506@mansionfamily.plus.com> <4730C8EC.7050002@mansionfamily.plus.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Thu, 08 Nov 2007 01:25:06 -0700 (MST) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: iSCSI in 7.0 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2007 08:25:21 -0000 Ivan Voras wrote: > James Mansion wrote: > >> So I guess the question really is - are you saying that in this case >> all kernel memory is non-pageable - or that you know that for the >> IP stack and iSCSI initiator, all the memory is non-pageable? > > If you don't get a definite answer here, you might want to ask that > particular questions on hackers @ freebsd.org or architecture @ > freebsd.org to get a wider audience of people who deal with low-level > systems like the VM. > Kernel text (executable code) and kernel data (malloc, zone, and module data segment memory) are non-pageable. Kernel stacks used to be pageable, but there was discussion some time ago about removing that feature and I don't recall the outcome. The real danger to memory deadlocks is mallocing in the I/O path. Even though kernel memory isn't pageable, the VM may need to page out some userland pages to satisfy a malloc. If that page-out goes through an I/O path that also needs to do a malloc, you get a deadlock. The CAM layer is free of these deadlocks, as are most storage drivers. I don't know if the iscsi-initiator driver is or not, I haven't inspected it closely for this. Unfortunately, the GEOM block layer is not free of this deadlock, so this whole discussion is mostly academic (the GEOM problem is small and very hard to trigger since it uses the zone allocator, but problems have been observed in real-world situations, which is a shame). Scott