From owner-freebsd-mips@FreeBSD.ORG Wed May 26 09:25:55 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C1FF106566C for ; Wed, 26 May 2010 09:25:55 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id EAE588FC44 for ; Wed, 26 May 2010 09:25:54 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1OHCra-0005Br-Eo; Wed, 26 May 2010 12:25:22 +0300 Date: Wed, 26 May 2010 12:27:19 +0300 From: Alexandr Rybalko To: "C. Jayachandran" Message-Id: <20100526122719.5f163434.ray@dlink.ua> In-Reply-To: References: Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: Fixes to the new pagetable page allocation code. X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2010 09:25:55 -0000 Hi, On Wed, 26 May 2010 10:33:58 +0530 "C. Jayachandran" wrote: >> The attached patch (also at >> http://people.freebsd.org/~jchandra/for-review/pmap-alloc-page-fix.diff) >> has two fixes for the new pagetable page allocation code, one to >> handle NULL return from the allocating function, and another to call >> VM_WAIT in cases we can wait. It also removes the variable 'req' left >> over from an earlier change. >> >> Please let me know if you have any comments... >> >> JC. >> + for (;;) { >> + m = vm_phys_alloc_contig(1, 0, MIPS_KSEG0_LARGEST_PHYS, >> + PAGE_SIZE, PAGE_SIZE); >> + if (m != NULL) >> + break; >> + if ((wait & M_WAITOK) == 0) >> + return (NULL); >> + VM_WAIT; >> + } So under low memory, subsystem will blocked forever if set M_WAITOK? I don`t think is good idea. -- Alexandr Rybalko aka Alex RAY