summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* Actively limit the allocation of mbufs to NMBUFS/nmbufs and mbuf clustersmsmith1999-12-281-2/+22
| | | | | | | | to NMBCLUSTERS/nmbclusters/kern.ipc.nmbclusters. Add a read-only sysctl kern.ipc.nmbufs matching kern.ipc.nmbclusters. Submitted by: Bosko Milekic <bmilekic@dsuper.net>
* Make m_print const correct (avoids a warning)eivind1999-12-201-1/+1
|
* Woops, I'm so sorry I forgot this! From the last mbuf.h change:green1999-12-181-2/+2
| | | | | | | m_mballoc_wakeup() (inline) -> MMBWAKEUP() (macro) m_clalloc_wakeup() (inline) -> MCLWAKEUP() (macro) Noticed by: peter
* Bug fix:green1999-12-141-0/+2
| | | | | | | | | | | The variables "m_mclalloc_wid" and "m_mballoc_wid" were not in the proper place. They should have been in uipc_mbuf.c and have been global, not in mbuf.h and local per each file that uses mbuf.h. Sorta bug fix: In mbuf.h, the definitions of various things for KERNEL and not KERNEL cases were very screwy. This fixes all of that which I could find.
* This is Bosko Milekic's mbuf allocation waiting code. Basically, thisgreen1999-12-121-22/+138
| | | | | | | | means that running out of mbuf space isn't a panic anymore, and code which runs out of network memory will sleep to wait for it. Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: green, wollman
* The functions m_copym() and m_copypacket() return read-only copies,archie1999-12-011-0/+78
| | | | | | | | | | | | because in the case of mbuf clusters they only increment the reference count rather than actually copying the data. Add comments to this effect, and add a new routine called m_dup() that returns a real, writable copy of an mbuf chain. This is preliminary work required for implementing 'ipfw tee'. Reviewed by: julian
* Fix a warning.peter1999-11-181-1/+1
|
* New function:phk1999-11-011-0/+16
| | | | | m_print(struct mbuf *); hexdumps a mbuf.
* change identical and "programming error" panic("mcopy*")'s intoalfred1999-10-131-12/+9
| | | | | | more verbose messages using KASSERT. Reviewed by: eivind, des
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Move the initialisation/tuning of nmbclusters from param.c/machdep.cmsmith1999-07-051-1/+11
| | | | | | | | | | | | | | | into uipc_mbuf.c. This reduces three sets of identical tunable code to one set, and puts the initialisation with the mbuf code proper. Make NMBUFs tunable as well. Move the nmbclusters sysctl here as well. Move the initialisation of maxsockets from param.c to uipc_socket2.c, next to its corresponding sysctl. Use the new tunable macros for the kern.vm.kmem.size tunable (this should have been in a separate commit, whoops).
* Slight reorganization of kernel thread/process creation. Instead of usingpeter1999-07-011-2/+2
| | | | | | | | | | | | | | | SYSINIT_KT() etc (which is a static, compile-time procedure), use a NetBSD-style kthread_create() interface. kproc_start is still available as a SYSINIT() hook. This allowed simplification of chunks of the sysinit code in the process. This kthread_create() is our old kproc_start internals, with the SYSINIT_KT fork hooks grafted in and tweaked to work the same as the NetBSD one. One thing I'd like to do shortly is get rid of nfsiod as a user initiated process. It makes sense for the nfs client code to create them on the fly as needed up to a user settable limit. This means that nfsiod doesn't need to be in /sbin and is always "available". This is a fair bit easier to do outside of the SYSINIT_KT() framework.
* Typo in comment.des1999-04-121-2/+2
|
* * Change sysctl from using linker_set to construct its tree using SLISTs.dfr1999-02-161-1/+2
| | | | | | | | | | This makes it possible to change the sysctl tree at runtime. * Change KLD to find and register any sysctl nodes contained in the loaded file and to unregister them when the file is unloaded. Reviewed by: Archie Cobbs <archie@whistle.com>, Peter Wemm <peter@netplex.com.au> (well they looked at it anyway)
* Only call m_reclaim() if M_WAIT since calling it from an interrupt candg1998-07-271-3/+11
| | | | | cause problems. PR: 7403
* Update M_EXT support in m_copypacket().phk1998-07-031-3/+11
| | | | | | | PR: 7122 Reviewed by: phk Submitted by: Castor Fu <castor@geocast.com> Originally forgotten by: julian
* If we are out of mb_map space and we failed to m_reclaim() anything anddg1998-06-051-7/+15
| | | | | | | the alloc is not M_DONTWAIT, then panic with "Out of mbuf clusters". Callers that specify M_WAIT can't deal with getting a NULL buffer, so this is a more graceful failure than randomly page faulting in the socket code or elsewhere.
* Don't depend on "implicit int".bde1998-02-201-2/+2
|
* Restored used include of <sys/malloc.h>. malloc() is not usedbde1997-12-281-21/+22
| | | | | | | | | | | | | here, but kmem_malloc() is used and it takes the same "flags" as malloc(). Use the mbuf allocation "flags" M_WAIT and M_DONTWAIT consistently. There is really only one boolean flag, M_DONTWAIT, but the "flags" were always treated as enum-like values, except in some places here where the values are tacitly converted to boolean flags. Treat them as enum-like values everywhere, except where we tacitly assume that there are only two values in order to convert them to the corresponding two kmem_malloc() "flags".
* Removed unused #includes.bde1997-10-281-2/+1
|
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-2/+1
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Removed unused #includes.bde1997-08-021-4/+1
|
* Create a new branch of the kernel MIB, kern.ipc, to storewollman1997-02-241-3/+19
| | | | | | | | | | | all of the configurables and instrumentation related to inter-process communication mechanisms. Some variables, like mbuf statistics, are instrumented here for the first time. For mbuf statistics: also keep track of m_copym() and m_pullup() failures, and provide for the user's inspection the compiled-in values of MSIZE, MHLEN, MCLBYTES, and MINCLSIZE.
* uipc_mbuf.c: do a better job of counting how often we have to waitwollman1997-02-181-6/+16
| | | | | | | for memory, or are denied a cluster. uipc_socket2.c: define some generic ``operation-not-supported'' entry points for pr_usrreqs.
* Provide an alternative mbuf cluster allocator which permits use ofwollman1997-02-131-1/+46
| | | | | | | clusters greater than one page in length by calling contigmalloc1(). This uses a helper process `mclalloc' to do the allocation if the system runs out at interrupt time to avoid calling contigmalloc at high spl. It is not yet clear to me whether this works.
* Fix bug related to map entry allocations where a sleep might be attempteddg1997-01-151-2/+2
| | | | | | | | when allocating memory for network buffers at interrupt time. This is due to inadequate checking for the new mcl_map. Fixed by merging mb_map and mcl_map into a single mb_map. Reviewed by: wollman
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* fix handling of external objects referenced by mbufsjulian1996-08-191-3/+11
| | | | | somehow this got broken between 4.3 tahoe and here, though I've been using these fixes for over a year here..
* Ups, I removed NMB_INIT too.phk1996-05-121-1/+3
| | | | Complained about by: asami
* Nail down NCL_INIT = 1, and put a comment there telling what it is.phk1996-05-111-8/+4
|
* Allocate mbufs from a separate submap so that NMBCLUSTERS works aswollman1996-05-101-3/+3
| | | | expected.
* Our new-old mbugf allocator. This is actually something of a blast fromwollman1996-05-081-1/+103
| | | | | | | | | the past, since it returns to the old system of allocating mbufs out of a private area rather than using the kernel malloc(). While this may seem like a backwards step to some, the new allocator is some 20% faster than the old one and has much better caching properties. Written by: John Wroclawski <jtw@lcs.mit.edu>
* An old typo MCLBYTES/CLBYTES became more obvious bogus now.phk1996-05-061-3/+3
| | | | Submitted by: wollman
* removed:phk1996-05-021-5/+5
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-4/+6
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* Completed function declarations and/or added prototypes.bde1995-12-021-2/+2
|
* Finished (?) cleaning up sysinit stuff.bde1995-12-021-8/+3
|
* Second batch of cleanup changes.phk1995-10-291-2/+1
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-4/+4
| | | | compiler warnings.
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-3/+13
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* Eliminate sloppy common-style declarations. There should be none left forbde1995-07-291-4/+9
| | | | the LINT configuation.
* Special cased the handling of mb_map in the M_WAITOK case. kmem_malloc()dg1995-03-151-7/+16
| | | | | | now returns NULL and sets a global 'mb_map_full' when the map is full. m_clalloc() has further been taught to expect this and do the right thing. This should fix the "mb_map full" panics that several people have reported.
* Implemented mbstat.m_wait and mbstat.m_drops.dg1995-02-231-1/+9
|
* Update kmem_malloc() call to new waitflag(s) interface.bde1995-02-051-2/+3
| | | | This might fix recent problems on thud and freefall.
* Got rid of map.h. It's a leftover from the rmap code, and we use rlists.dg1994-10-091-2/+1
| | | | Changed swapmap into swaplist.
* Moved m_copyback into uipc_mbuf.cphk1994-10-041-1/+54
|
* All of this is cosmetic. prototypes, #includes, printfs and so on. Makesphk1994-10-021-6/+5
| | | | GCC a lot more silent.
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+8
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
OpenPOWER on IntegriCloud