From owner-freebsd-current Sun Feb 4 11:38:18 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA26948 for current-outgoing; Sun, 4 Feb 1996 11:38:18 -0800 (PST) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA26943 for ; Sun, 4 Feb 1996 11:38:15 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by Root.COM (8.6.12/8.6.5) with SMTP id LAA00753; Sun, 4 Feb 1996 11:38:21 -0800 Message-Id: <199602041938.LAA00753@Root.COM> X-Authentication-Warning: implode.Root.COM: Host localhost didn't use HELO protocol To: KATO Takenori cc: current@freebsd.org Subject: Re: kmem_malloc called at splimp In-reply-to: Your message of "Mon, 05 Feb 1996 01:05:41 +0900." <199602041605.BAA00550@marble.eps.nagoya-u.ac.jp> From: David Greenman Reply-To: davidg@Root.COM Date: Sun, 04 Feb 1996 11:38:21 -0800 Sender: owner-current@freebsd.org Precedence: bulk >The function kmem_malloc() is called at splimp when mbuffer is >initialized. Is it safe? > >1. The function mbinit() calls m_clalloc() at splimp. >2. The function m_clalloc() calls kmem_malloc() without changing > software interruption mask. >3. Therefore, kmem_malloc() is called at splimp. > >4. The comment of kmem_malloc says that `this still only works in a > uni-processor environment and when called at splhigh().' > ^^^^^^^^^^^^^^^^^^^^^^^^ >Because splimp of FreeBSD doesn't block disk I/O, above operation may >clobber vm map IF disk I/O interruption occurs. (I have not checked >whether it occurs or not, yet.) Our kernel malloc currently only supports interrupt-time allocations for network buffers (splimp). We've considered changing this to be safe to use in all cases, but we haven't done this yet. For this reason, only network drivers are allowed to use malloc at interrupt time. If you know of a specific case where a malloc is occuring during a non-network interrupt, please let us know! -DG David Greenman Core Team/Principal Architect, The FreeBSD Project