Date: Sun, 04 Feb 1996 11:38:21 -0800 From: David Greenman <davidg@Root.COM> To: KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp> Cc: current@freebsd.org Subject: Re: kmem_malloc called at splimp Message-ID: <199602041938.LAA00753@Root.COM> In-Reply-To: Your message of "Mon, 05 Feb 1996 01:05:41 %2B0900." <199602041605.BAA00550@marble.eps.nagoya-u.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602041938.LAA00753>