The NetBSD Project

CVS log for src/sys/sys/pool.h

[BACK] Up to [cvs.NetBSD.org] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.75 / (download) - annotate - [select for diffs], Tue Jun 5 22:51:47 2012 UTC (12 months, 1 week ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-nbase, tls-maxphys-base, tls-maxphys, khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.74: +2 -3 lines
Diff to previous 1.74 (colored)

Now that pool_cache_invalidate() is synchronous and can handle per-CPU
caches, merge together pool_drain_start() and pool_drain_end() into

bool pool_drain(struct pool **ppp);

"bool" value indicates whether reclaiming was fully done (true) or not (false)
"ppp" will contain a pointer to the pool that was drained (optional).

See http://mail-index.netbsd.org/tech-kern/2012/06/04/msg013287.html

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 5 19:15:10 2012 UTC (13 months, 1 week ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.73: +1 -28 lines
Diff to previous 1.73 (colored)

G/C POOL_DIAGNOSTIC option.  No objection on tech-kern@.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:41 2012 UTC (16 months, 3 weeks ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.72: +2 -6 lines
Diff to previous 1.72 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.72 / (download) - annotate - [select for diffs], Mon Nov 21 04:36:05 2011 UTC (18 months, 4 weeks ago) by christos
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.71: +4 -4 lines
Diff to previous 1.71 (colored)

change printf gcc attribute to __printflike(), requested by joerg.

Revision 1.71 / (download) - annotate - [select for diffs], Sun Nov 20 23:37:00 2011 UTC (18 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.70: +6 -4 lines
Diff to previous 1.70 (colored)

add more missing printf attributes.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Jun 3 10:40:17 2010 UTC (3 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Report result of pool_reclaim() from pool_drain_end().

Revision 1.69 / (download) - annotate - [select for diffs], Sun May 30 02:28:13 2010 UTC (3 years ago) by dholland
Branch: MAIN
Changes since 1.68: +2 -1 lines
Diff to previous 1.68 (colored)

Uses MAXCPUS from sys/param.h; include that explicitly instead of by
accident.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Dec 30 18:57:16 2009 UTC (3 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.67: +2 -3 lines
Diff to previous 1.67 (colored)

Turn PA_INITIALIZED to a reference count for the pool allocator, and once
it drops to zero destroy the mutex we initialize. This fixes the problem
mentioned in

	http://mail-index.netbsd.org/tech-kern/2009/12/28/msg006727.html

Also remove pa_flags now that it's no longer needed.

Idea from matt@, okay matt@.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Oct 15 20:50:12 2009 UTC (3 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.66: +1 -2 lines
Diff to previous 1.66 (colored)

- pool_cache_invalidate(): broadcast a cross-call to drain the per-CPU
  caches before draining the global cache.
- pool_cache_invalidate_local(): remove.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Oct 8 21:54:45 2009 UTC (3 years, 8 months ago) by jym
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

Add pool_cache_invalidate_local() to the pool_cache(9) API, to permit
per-CPU objects invalidation when cached in the pool cache.

See http://mail-index.netbsd.org/tech-kern/2009/10/05/msg006206.html .

Reviewed by bouyer@. Thanks!

Revision 1.65 / (download) - annotate - [select for diffs], Sun Sep 13 18:45:12 2009 UTC (3 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.64: +1 -18 lines
Diff to previous 1.64 (colored)

Wipe out the last vestiges of POOL_INIT with one swift stroke.  In
most cases, use a proper constructor.  For proplib, give a local
equivalent of POOL_INIT for the kernel object implementation.  This
way the code structure can be preserved, and a local link set is
not hazardous anyway (unless proplib is split to several modules,
but that'll be the day).

tested by booting a kernel in qemu and compile-testing i386/ALL

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jul 4 16:38:59 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

- Keep cache locked while allocating a cache group - later we might want
  to automatically tune the group sizes at run time.
- Fix broken assertion.
- Avoid another test+branch.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:11 2008 UTC (5 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, simonb-wapbl
Changes since 1.62: +1 -8 lines
Diff to previous 1.62 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.62 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:38 2007 UTC (5 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Dec 24 16:45:16 2007 UTC (5 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

Make values of PR_WAITOK/PR_NOWAIT match KM_SLEEP/KM_NOSLEEP. This makes it
trivial to emulate most of Solaris' kmem_cache interface with a few macros.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Dec 20 23:49:11 2007 UTC (5 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.59: +22 -13 lines
Diff to previous 1.59 (colored)

- Support two different sizes of pool_cache group. The default has 14 or 15
  items, and the new large groups (for busy caches) have 62 or 63 items.
- Add PR_LARGECACHE flag as a hint that a pool_cache should use large groups.
  This should be eventually be tuned at runtime.
- Report group size for vmstat -C.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Dec 13 02:45:10 2007 UTC (5 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3
Changes since 1.58: +2 -1 lines
Diff to previous 1.58 (colored)

add ddb "whatis" command.  inspired from solaris ::whatis dcmd.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Nov 18 16:27:42 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base2, yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: yamt-kmem, vmlocking2, bouyer-xeni386
Changes since 1.57: +4 -5 lines
Diff to previous 1.57 (colored)

Work around issues with pool_cache on sparc.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:42 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.56: +98 -62 lines
Diff to previous 1.56 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:37 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-idlelwp-base8, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, jmcneill-base, hpcarm-cleanup
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.55: +5 -4 lines
Diff to previous 1.55 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:37 2007 UTC (6 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, vmlocking
Changes since 1.54: +6 -1 lines
Diff to previous 1.54 (colored)

Merge newlock2 to head.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Aug 20 09:35:25 2006 UTC (6 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, rpaulo-netinet-merge-pcb-base, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: newlock2
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored)

implement PR_NOALIGN.  (allow unaligned pages)
to be used by vmem quantum cache.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 5 15:19:38 2006 UTC (6 years, 11 months ago) by itohy
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Back out previous change.  The problem was not here.  Oops.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jul 4 14:09:37 2006 UTC (6 years, 11 months ago) by itohy
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Do not define the link_set symbol as static, or a.out linker won't find it.

Revision 1.51 / (download) - annotate - [select for diffs], Sat May 27 08:41:13 2006 UTC (7 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.50: +3 -7 lines
Diff to previous 1.50 (colored)

remove a nested function so that its initializers can be compiled by gcc2.
pointed by Havard Eidnes.

Revision 1.50 / (download) - annotate - [select for diffs], Fri May 26 00:26:12 2006 UTC (7 years ago) by uebayasi
Branch: MAIN
Changes since 1.49: +3 -1 lines
Diff to previous 1.49 (colored)

Expose struct pool::struct callback_entry pr_reclaimerentry only when _KERNEL
is defined.  Fix build of src/sbin/mount/mount_tmpfs/mount_tmpfs.c.

Revision 1.49 / (download) - annotate - [select for diffs], Thu May 25 14:27:28 2006 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.48: +16 -3 lines
Diff to previous 1.48 (colored)

move wait points for kva from upper layers to vm_map.  PR/33185 #1.

XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html

Revision 1.48 / (download) - annotate - [select for diffs], Fri Feb 24 11:46:20 2006 UTC (7 years, 3 months ago) by bjh21
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, peter-altq, elad-kernelauth-base, elad-kernelauth
Branch point for: yamt-pdpolicy, chap-midi
Changes since 1.47: +6 -1 lines
Diff to previous 1.47 (colored)

Medium-sized overhaul of POOL_SUBPAGE support so that:
1: I can understand it, and
2: It works.
Notable externally-visible changes are that POOL_SUBPAGE now has to be a
compile-time constant, and that trying to initialise a pool whose objects are
larger than POOL_SUBPAGE automatically generates a pool that doesn't use
subpages.

NetBSD/acorn26 now boots multi-user again.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Dec 1 13:21:05 2005 UTC (7 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: ktrace-lwp-base
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

add "show all pools" command for ddb.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Oct 2 17:29:31 2005 UTC (7 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.45: +12 -11 lines
Diff to previous 1.45 (colored)

optimize pool_caches similarly to how I optimized pools before:
split the single list of pool cache groups into three lists:
completely full, partially full, and completely empty.
use LIST instead of TAILQ where appropriate.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Jan 1 21:04:39 2005 UTC (8 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, matt-timespec, kent-audio2-base, kent-audio2, kent-audio1-beforemerge
Branch point for: yamt-lazymbuf, netbsd-3-0, netbsd-3
Changes since 1.44: +3 -1 lines
Diff to previous 1.44 (colored)

introduce a new flag for pool_init, PR_NOTOUCH.
if it's specified, don't use free items as storage for internal state.
so that we can use pools for non memory backed objects.
inspired from solaris's KMC_NOTOUCH.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 20 18:19:27 2004 UTC (9 years ago) by thorpej
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (colored)

Remove PR_IMMEDRELEASE, since setting the high water mark will achieve
the same thing.

Pointed out back in January by YAMAMOTO Takashi.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:43 2004 UTC (9 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.42: +19 -1 lines
Diff to previous 1.42 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jan 9 19:00:16 2004 UTC (9 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored)

Add a new pool initialization flag, PR_IMMEDRELEASE.  This flag causes
idle pool pages to be returned to the system immediately upon becoming
de-fragmented.

Also, in pool_do_put(), don't free back an idle page unless we are over
our minimum page claim.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 13 02:44:01 2003 UTC (9 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.40: +11 -6 lines
Diff to previous 1.40 (colored)

two changes in improve scalability:

 (1) split the single list of pages allocated to a pool into three lists:
     completely full, partially full, and completely empty.
     there is no longer any need to traverse any list looking for a
     certain type of page.

 (2) replace the 8-element hash table for out-of-page page headers
     with a splay tree.

these two changes (together with the recent enhancements to the wait code)
give us linear scaling for a fork+exit microbenchmark.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Sep 7 11:37:13 2003 UTC (9 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

remove variable names from prototype for consistency.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Apr 9 18:22:13 2003 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.38: +12 -4 lines
Diff to previous 1.38 (colored)

Add the ability for pool caches to cache the physical address of
objects.  Clients of the pool_cache API must consistently use
the "paddr" variants or not, otherwise behavior is undefined.

Enable this on Alpha, ARM, MIPS, and x86.  Other platforms must
define POOL_VTOPHYS() in the appropriate manner in order to enable
the feature.

Part 1 of a series of simple patches contributed by Wasabi Systems
to improve network performance.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Aug 25 23:03:39 2002 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, fvdl_fs64_base
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Fix signed/unsigned comparison warnings from GCC 3.3.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Mar 13 10:57:19 2002 UTC (11 years, 3 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.36: +11 -1 lines
Diff to previous 1.36 (colored)

Move 'struct pool_cache_group' definition into <sys/pool.h>

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 11 01:19:17 2002 UTC (11 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Fix indentation.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 11 01:16:43 2002 UTC (11 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Fix function decl. of _pool_reclaim() so that subr_pool.c compiles again
even if POOL_DIAGNOSTIC is defined.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Mar 9 18:06:54 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock
Changes since 1.33: +1 -0 lines
Diff to previous 1.33 (colored)

Put back pool_prime(); the i386 mp pmap uses it.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 9 01:56:27 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

Remove pool_prime().  Nothing uses it, and how it should be used it not
really well-defined in the absense of PR_STATIC.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Mar 9 01:33:33 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (colored)

Remove PR_MALLOCOK and PR_STATIC.  The former wasn't actually used,
and the latter, while there was some code tested the bit, was woefully
incomplete and also unused by anything.  Besides, PR_STATIC functionality
could be better handled by backend allocators anyhow.

From art@openbsd.org

Revision 1.31 / (download) - annotate - [select for diffs], Fri Mar 8 21:41:59 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +9 -1 lines
Diff to previous 1.30 (colored)

Add an optional "drain" client callback, which can be set by the new
pool_set_drain_hook().  This hook is called in three cases:
* When a pool has hit the hard limit, just before either erroring
  out or sleeping.
* When a backend allocator fails to allocate memory.
* Just before trying to reclaim pages in pool_reclaim().

This hook requests the client to try and free some items back to
the pool.

From art@openbsd.org.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Mar 8 20:51:25 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +1 -2 lines
Diff to previous 1.29 (colored)

Remove PR_FREEHEADER; nothing uses it anymore.

From art@openbsd.org.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:45 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +39 -30 lines
Diff to previous 1.28 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 7 12:44:06 2001 UTC (11 years, 8 months ago) by bjh21
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, ifpoll-base, ifpoll
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

Add support for allocating pool memory in units smaller than a whole page.
This is activated by defining POOL_SUBPAGE to the size of the new allocation
unit, and makes pools much more efficient on machines with obscenely large
pages.  It might even make four-megabyte arm26 systems usable.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jun 6 22:00:17 2001 UTC (12 years ago) by rafal
Branch: MAIN
CVS Tags: thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.26: +5 -1 lines
Diff to previous 1.26 (colored)

Jason's last fix broke builds with POOL_DIAGNOSTIC (the kernel didn't link
as pool_get was never defined).  Fix that.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jun 5 18:51:03 2001 UTC (12 years ago) by thorpej
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Do the reentrancy checking if POOL_DIAGNOSTIC, not DIAGNOSTIC.  Prevents
ABI change for diagnostic vs. non-diagnostic kernels.

Revision 1.25 / (download) - annotate - [select for diffs], Sun May 13 17:17:34 2001 UTC (12 years, 1 month ago) by sommerfeld
Branch: MAIN
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored)

Make this build again ifdef DIAGNOSTIC (oops)

Revision 1.24 / (download) - annotate - [select for diffs], Sun May 13 17:06:58 2001 UTC (12 years, 1 month ago) by sommerfeld
Branch: MAIN
Changes since 1.23: +8 -2 lines
Diff to previous 1.23 (colored)

Remove pool reentrancy testing overhead unless DIAGNOSTIC is defined.
Previously, we passed __FILE__ and __LINE__ on all pool_get/pool_set calls.

This change results in a measured 1.2% performance improvement in
ping-flood packets-per-second as reported by ping(8).

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 10 04:51:41 2001 UTC (12 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Rearrange the code that adds pages of objects to the pool; require
that the caller allocate the pool_item_header when it allocates the
pool page, so we can avoid a locking pitfall (sleeping with a simple
lock held).

Also revive pool_prime(), as there are some letigimate uses of it,
but in doing so, eliminate some of the bogosities of the old version
(i.e. don't do an implicit "setlowat", just prime the pool, and incr
the minpages for each additional page we add, and compute the number
of pages to prime in a way that callers would expect).

Revision 1.22 / (download) - annotate - [select for diffs], Wed May 9 23:46:02 2001 UTC (12 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.21: +1 -7 lines
Diff to previous 1.21 (colored)

Remove pool_create() and pool_prime().  Nothing except pool_create()
used pool_prime(), and no one uses pool_create() anymore.

This makes it easier to fix a locking pitfall.

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 4 19:41:25 2001 UTC (12 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Add pool_cache_destruct_object(), used to force destruction of
an object and release back into the pool.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Dec 11 05:22:55 2000 UTC (12 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.19: +9 -1 lines
Diff to previous 1.19 (colored)

Add some basic statistics to pool_cache.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Dec 7 05:45:57 2000 UTC (12 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +33 -2 lines
Diff to previous 1.18 (colored)

This is a first-cut implementation of support for caching of
constructed objects in the pool allocator, similar to caching
of constructed objects in the Solaris SLAB allocator.

This implementation is a separate API (pool_cache_*()) layered
on top of pools to keep the caching complexity out of the way
of pools that won't benefit from it.

While we're here, allow pool items to be as large as the pool
page size.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Dec 6 18:20:52 2000 UTC (12 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.17: +22 -26 lines
Diff to previous 1.17 (colored)

ANSI'ify.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 14 21:17:04 2000 UTC (13 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Change ratecap to its presumably intended type of struct timeval.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Aug 5 04:00:03 1999 UTC (13 years, 10 months ago) by sommerfeld
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Create new pool flag PR_LIMITFAIL, indicating that even PR_WAIT
allocations should fail if the pool is at its hard limit.
Document flag in pool(9).
Use it in mbuf.h for the first allocate call for M_GET, M_GETHDR, and
MCLGET, so that m_reclaim gets called even for blocking allocations.

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 10 21:13:05 1999 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.14: +20 -14 lines
Diff to previous 1.14 (colored)

Improve the pool allocator's diagnostic helpers, adding the ability to
log on a per-pool basis, reentrancy checking, and dumping various pool
information from DDB.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Mar 31 23:23:47 1999 UTC (14 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.13: +32 -17 lines
Diff to previous 1.13 (colored)

Yet more fixes to the pool allocator:

- Protect userspace from unnecessary header inclusions (as noted on
current-users).

- Some const poisioning.

- GREATLY simplify the locking protocol, and fix potential deadlock
scenarios.  In particular, assume that the back-end page allocator
provides its own locking mechanism (this is currently true for all
such allocators in the NetBSD kernel).  Doing so allows us to simply
use one spin lock for serialized access to all r/w members of the pool
descriptor.  The spin lock is released before calling the back-end
allocator, and re-acquired upon return from it.

- Fix a problem in pr_rmpage() where a data structure was referenced
after it was freed.

- Minor tweak to page manaement.  Migrate both idle and empty pages
to the end of the page list.  As soon as a page becomes un-empty
(by a pool_put()), place it at the head of the page list, and set
curpage to point to it.  This reduces fragmentation as well as the
time required to find a non-empty page as soon as curpage becomes
empty again.

- Use mono_time throughout, and protect access to it w/ splclock().

- In pool_reclaim(), if freeing an idle page would reduce the number
of allocatable items to below the low water mark, don't.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 31 01:14:06 1999 UTC (14 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.12: +16 -2 lines
Diff to previous 1.12 (colored)

Fix several bugs/deficiencies in the pool allocator:

- Add support for hard limits, with optional rate-limited logging of
a warning message when the pool limit is reached.  (This will be used
to fix a bug in mbuf cluster allocation on the MIPS and Alpha ports.)

- Fix some locking protocol errors.  This required splitting pr_flags
into pr_flags (which is protected by the spin lock) and pr_roflags (which
are `read only' flags, set when the pool is initialized, and never changed
again; these do not need to be protected by a mutex).

- Make the low water support actually mean something.  When a low water
mark is set, add free items to the pool until the low water mark is
reached.  When an item allocation causes the number of free items to
drop below the low water mark, make the pool catch up to it.  This can
make the pool allocator more useful for several applications (e.g.
pmap `pv entry' management) and more robust for others (for e.g. mbuf
and mbuf cluster allocation, so that the pagedaemon can use NFS to clean
pages on diskless systems without completely running dry on buffers to
receive packets in during extreme memory shoratages).

- Add a comment where we sleep waiting for more pages for the back-end
page allocator.  Specifically, instead of sleeping potentially forever,
perhaps we should just wake up once a second to try allocating a page
again.  XXX Revisit this soon.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Dec 27 21:13:43 1998 UTC (14 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored)

Make this compile with POOL_DIAGNOSTIC, and add a POOL_LOGSIZE option.
Defopt these.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 16 04:28:23 1998 UTC (14 years, 6 months ago) by briggs
Branch: MAIN
Changes since 1.10: +5 -1 lines
Diff to previous 1.10 (colored)

Prototype pool_print() and pool_chk() if DEBUG.
Initialize pool hash table with PR_HASHTABSIZE (i.e., 8) LIST_INIT()s
instead of one memset().
Only check for page != ph->ph_page if PR_PHINPAGE is set (in pool_chk()).
Print pool base pointer when reporting page inconsistency in pool_chk().

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 29 18:09:29 1998 UTC (14 years, 8 months ago) by pk
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.9: +10 -1 lines
Diff to previous 1.9 (colored)

In addition to the spinlock, use the lockmgr() to serialize access to
the back-end page allocator. This allows the back-end to sleep since we
now relinquish the spin lock after acquiring the long-term lock.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 13 14:46:24 1998 UTC (14 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Fix copyright typos...

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 5 17:30:40 1998 UTC (14 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Update copyright.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Aug 28 21:18:38 1998 UTC (14 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +8 -1 lines
Diff to previous 1.6 (colored)

Add an alternate pool page allocator that can be used if the pool is
never accessed in interrupt context.  In the UVM case, this uses the
kernel_map, to reduce usage of the previous kmem_map resource.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 1 23:44:20 1998 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

Instrument "idle pages" (i.e. pages which have no items allocated from
them, and could thus be freed back to the system).

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 31 02:53:34 1998 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

Add PR_NOWAIT (0) for symmetry.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jul 23 20:34:02 1998 UTC (14 years, 10 months ago) by pk
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.3: +80 -16 lines
Diff to previous 1.3 (colored)

Re-vamped pool manager.
	* support for customized memory supplier
	* automatic page reclaim by VM system
	* time-based hysteresis
	* cache coloring (after Bonwick's "slabs")

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 19 23:51:48 1998 UTC (15 years, 4 months ago) by pk
Branch: MAIN
Changes since 1.2: +8 -3 lines
Diff to previous 1.2 (colored)

Add option to use "static" storage provided by the caller.
From Matthias Drochner.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 10 00:25:41 1998 UTC (15 years, 4 months ago) by perry
Branch: MAIN
Changes since 1.1: +6 -1 lines
Diff to previous 1.1 (colored)

add/cleanup multiple inclusion protection.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Dec 15 11:14:57 1997 UTC (15 years, 6 months ago) by pk
Branch: MAIN

Memory pool resource utility.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>