From owner-freebsd-hackers Fri Jul 27 17:25:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id BB0EF37B401 for ; Fri, 27 Jul 2001 17:25:16 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from opal (cs.binghamton.edu [128.226.123.101]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f6S0Nq412865; Fri, 27 Jul 2001 20:23:52 -0400 (EDT) Date: Fri, 27 Jul 2001 20:23:37 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@opal To: Terry Lambert Cc: Bosko Milekic , Alfred Perlstein , vishwanath pargaonkar , freebsd-hackers@FreeBSD.ORG Subject: Re: cluster size In-Reply-To: <3B61071A.C637EA85@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I thought doing a memory free is always safe in an interrupt context. Now it seems doing an allocation of memory is safe too. Does MCLGET() call vm_page_alloc() or malloc() eventually? If so, it might block. -Zhihui On Thu, 26 Jul 2001, Terry Lambert wrote: > Bosko Milekic wrote: > > > > Er, wouldn't that be the only way for cards to refil thier DMA > > > > recieve buffers? > > > > > > Look at the Tigon II and FXP drivers. The allocations in > > > the macros turn into m_get, not m_clusterget. > > > > From if_fxp.c (fxp_add_rfabuf(), sometimes called from fxp_intr()): > > > > MGETHDR(...); <-- get mbuf > > if (m != NULL) { > > MCLGET(...); <-- get cluster > > ... > > } > > Yes, I had misread things. Alfred pointed this out to me in > person, earlier. I had been reading the jumbogram code, > which uses a seperate buffer space, and then just incorrectly > assumed. > > Thanks for getting thecorrection into the list archives, so > that future readers will be less confused: you spared me > having to do the same. > > -- Terry > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message