| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
netstat(1) not display it for now because its effects are not yet
completely implemented and we're about to cut 5.2-RELEASE.
This is temporary.
Approved by: re (scottl, rwatson)
Notes:
svn path=/head/; revision=115037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compile-time constants). That is, a "bucket" now is not necessarily
a page-worth of mbufs or clusters, but it is MBUF_BUCK_SZ, CLUS_BUCK_SZ
worth of mbufs, clusters.
o Rename {mbuf,clust}_limit to {mbuf,clust}_hiwm and introduce
{mbuf,clust}_lowm, which currently has no effect but will be used
to set the low watermarks.
o Fix netstat so that it can deal with the differently-sized buckets
and teach it about the low watermarks too.
o Make sure the per-cpu stats for an absent CPU has mb_active set to 0,
explicitly.
o Get rid of the allocate refcounts from mbuf map mess. Instead,
just malloc() the refcounts in one shot from mbuf_init()
o Clean up / update comments in subr_mbuf.c
Notes:
svn path=/head/; revision=111164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
a word).
Notes:
svn path=/head/; revision=102975
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when I changed the allocator bits. This implements per-CPU mbtypes
stats by keeping net number of decrements/increments of a given mbtype
per-CPU and then summing all of the per-CPU mbtypes to produce the total
net number of allocated mbufs of the given mbtype.
Counters are carefully balanced to avoid/prevent underflows/overflows.
mbtypes stats are re-enabled with the idea that we may occasionally
(although very rarely) observe slight inconsistencies in the stat
reporting. Most of the time, we should be fine, though.
Also make appropriate modifications to netstat(1) and systat(1) to do
the necessary reporting.
Submitted by: Jiangyi Liu <jyliu@163.net>
Notes:
svn path=/head/; revision=84153
|
|
|
|
|
|
|
|
|
|
|
|
| |
approximately the amount of memory allocated from the mbuf maps
and sitting in the mbuf allocator's cache containers, and display
in parantheses the percentage of said memory that is actually
in use at the given time `netstat -m' is executed.
Suggested by: mjacob
Notes:
svn path=/head/; revision=80720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
were indices in a dense array. The cpuids are a sparse set and treat
them as such, setting up containers only for CPUs activated during
mb_init().
- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse
map, in accordance with the above.
This allows us to properly boot with certain CPUs disactivated. However, if
we later decide to re-activate said CPUs, we will barf until we decide to
implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU
containers to get configured on their activation.
Reported by: mjacob
Partially (sys/ diffs) Submitted by: mjacob
Notes:
svn path=/head/; revision=80399
|
|
|
|
|
|
|
|
| |
- Make sure to try hw.ncpu if kern.smp.cpus doesn't exist (i.e. on UP) to
get number of CPUs.
Notes:
svn path=/head/; revision=78665
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introduce a modified allocation mechanism for mbufs and mbuf clusters; one
which can scale under SMP and which offers the possibility of resource
reclamation to be implemented in the future. Notable advantages:
o Reduce contention for SMP by offering per-CPU pools and locks.
o Better use of data cache due to per-CPU pools.
o Much less code cache pollution due to excessively large allocation macros.
o Framework for `grouping' objects from same page together so as to be able
to possibly free wired-down pages back to the system if they are no longer
needed by the network stacks.
Additional things changed with this addition:
- Moved some mbuf specific declarations and initializations from
sys/conf/param.c into mbuf-specific code where they belong.
- m_getclr() has been renamed to m_get_clrd() because the old name is really
confusing. m_getclr() HAS been preserved though and is defined to the new
name. No tree sweep has been done "to change the interface," as the old
name will continue to be supported and is not depracated. The change was
merely done because m_getclr() sounds too much like "m_get a cluster."
- TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and
systat(1) (see TODO below).
- Fixed systat(1) to display number of "free mbufs" based on new per-CPU
stat structures.
- Fixed netstat(1) to display new per-CPU stats based on sysctl-exported
per-CPU stat structures. All infos are fetched via sysctl.
TODO (in order of priority):
- Re-enable mbtypes statistics in both netstat(1) and systat(1) after
introducing an SMP friendly way to collect the mbtypes stats under the
already introduced per-CPU locks (i.e. hopefully don't use atomic() - it
seems too costly for a mere stat update, especially when other locks are
already present).
- Optionally have systat(1) display not only "total free mbufs" but also
"total free mbufs per CPU pool."
- Fix minor length-fetching issues in netstat(1) related to recently
re-enabled option to read mbuf stats from a core file.
- Move reference counters at least for mbuf clusters into an unused portion
of the cluster itself, to save space and need to allocate a counter.
- Look into introducing resource freeing possibly from a kproc.
Reviewed by (in parts): jlemon, jake, silby, terry
Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha)
Preliminary performance measurements: jlemon (and me, obviously)
URL: http://people.freebsd.org/~bmilekic/mb_alloc/
Notes:
svn path=/head/; revision=78592
|
|
|
|
| |
Notes:
svn path=/head/; revision=78314
|
|
|
|
|
|
|
| |
Requested by: bde
Notes:
svn path=/head/; revision=78309
|
|
|
|
| |
Notes:
svn path=/head/; revision=78245
|
|
|
|
|
|
|
| |
PR: 20808
Notes:
svn path=/head/; revision=78219
|
|
|
|
|
|
|
| |
"in use" percentage. In other words, show how much of mb_map is in use.
Notes:
svn path=/head/; revision=67147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that should be better.
The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.
NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.
The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.
Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.
The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.
The size of the pool of reference counters is available in the
stats provided by "netstat -m".
PR: 19866
Submitted by: Bosko Milekic <bmilekic@dsuper.net>
Reviewed by: alfred (glanced at by others on -net)
Notes:
svn path=/head/; revision=64837
|
|
|
|
|
|
|
|
|
|
| |
expand the size from short to ulong
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
PR: kern/19809
Notes:
svn path=/head/; revision=63203
|
|
|
|
|
|
|
| |
Submitted by: Bosko Milekic <bmilekic@dsuper.net>
Notes:
svn path=/head/; revision=55172
|
|
|
|
| |
Notes:
svn path=/head/; revision=50477
|
|
|
|
| |
Notes:
svn path=/head/; revision=42800
|
|
|
|
| |
Notes:
svn path=/head/; revision=38491
|
|
|
|
| |
Notes:
svn path=/head/; revision=38427
|
|
|
|
| |
Notes:
svn path=/head/; revision=37453
|
|
|
|
| |
Notes:
svn path=/head/; revision=36080
|
|
|
|
|
|
|
| |
sysctl variable (previously committed).
Notes:
svn path=/head/; revision=35414
|
|
|
|
|
|
|
| |
Submitted by: "Alex G. Bulushev" <bag@demos.su>
Notes:
svn path=/head/; revision=31097
|
|
|
|
|
|
|
| |
ripped out.
Notes:
svn path=/head/; revision=28284
|
|
|
|
|
|
|
| |
Cosmetic in usage string.
Notes:
svn path=/head/; revision=27753
|
|
|
|
|
|
|
| |
groveling about in kmem.
Notes:
svn path=/head/; revision=23086
|
|
|
|
|
|
|
|
|
|
| |
the kernel malloc, netstat was never updated to reflect the fact that
there are once again allocated-but-free mbufs, just as there are
clusters, and so the information presented about how much memory was
allocated to the network was bogus. Fixed.
Notes:
svn path=/head/; revision=22615
|
|
|
|
|
|
|
|
|
| |
specifiers (some unsigned values were printed as signed, some longs
were printed as ints), and place parentheses around assignments in
if statements.
Notes:
svn path=/head/; revision=16080
|
|
|
|
| |
Notes:
svn path=/head/; revision=6668
|
|
|
|
|
|
|
|
| |
Print non-zero expiration timers.
Use err(3) for error reporting.
Notes:
svn path=/head/; revision=5811
|
|
Notes:
svn path=/cvs2svn/branches/CHRISTOS/; revision=1590
|