OpenBSD CVS

CVS log for src/sys/uvm/uvm_pmemrange.h


[BACK] Up to [local] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17 / (download) - annotate - [select for diffs], Wed May 1 12:54:27 2024 UTC (5 weeks, 5 days ago) by mpi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored)

Add per-CPU caches to the pmemrange allocator.

The caches are used primarily to reduce contention on uvm_lock_fpageq() during
concurrent page faults.  For the moment only uvm_pagealloc() tries to get a
page from the current CPU's cache.  So on some architectures the caches are
also used by the pmap layer.

Each cache is composed of two magazines, design is borrowed from jeff bonwick
vmem's paper and the implementation is similar to the one of pool_cache from
dlg@.  However there is no depot layer and magazines are refilled directly by
the pmemrange allocator.

This version includes splvm()/splx() dances because the buffer cache flips
buffers in interrupt context.  So we have to prevent recursive accesses to
per-CPU magazines.

Tested by naddy@, solene@, krw@, robert@, claudio@ and Laurence Tratt.

ok claudio@, kettenis@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 19 10:22:51 2024 UTC (7 weeks, 3 days ago) by mpi
Branch: MAIN
Changes since 1.15: +0 -4 lines
Diff to previous 1.15 (colored)

Revert per-CPU caches a double-free has been found by naddy@.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Apr 17 13:12:58 2024 UTC (7 weeks, 5 days ago) by mpi
Branch: MAIN
Changes since 1.14: +5 -1 lines
Diff to previous 1.14 (colored)

Add per-CPU caches to the pmemrange allocator.

The caches are used primarily to reduce contention on uvm_lock_fpageq() during
concurrent page faults.  For the moment only uvm_pagealloc() tries to get a
page from the current CPU's cache.  So on some architectures the caches are
also used by the pmap layer.

Each cache is composed of two magazines, design is borrowed from jeff bonwick
vmem's paper and the implementation is similar to the one of pool_cache from
dlg@.  However there is no depot layer and magazines are refilled directly by
the pmemrange allocator.

Tested by robert@, claudio@ and Laurence Tratt.

ok kettenis@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Sep 16 02:47:09 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

move uvm_pmemrange_addr from RB macros to RBT functions

Revision 1.13 / (download) - annotate - [select for diffs], Fri Sep 16 02:35:42 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.12: +7 -7 lines
Diff to previous 1.12 (colored)

move the vm_page struct from being stored in RB macro trees to RBT functions

vm_page structs go into three trees, uvm_objtree, uvm_pmr_addr, and
uvm_pmr_size. all these have been moved to RBT code.

this should give us a decent chunk of code space back.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Feb 5 23:51:06 2015 UTC (9 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.11: +1 -4 lines
Diff to previous 1.11 (colored)

Remove some unneeded <uvm/uvm_extern.h> inclusions.

ok deraadt@, miod@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 8 18:25:56 2011 UTC (12 years, 11 months ago) by ariane
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.10: +1 -5 lines
Diff to previous 1.10 (colored)

Move uvm_pmr_alloc_pig to kern/subr_hibernate.c

No callers, no functional change.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 8 18:20:10 2011 UTC (12 years, 11 months ago) by ariane
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)

Move uvm_pmr_zero_everything() to subr_hibernate.

This function will probably die before ever being called
from the in-tree code, since hibernate will move to RLE encoding.

No functional change, function had no callers.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 8 18:15:44 2011 UTC (12 years, 11 months ago) by ariane
Branch: MAIN
Changes since 1.8: +29 -1 lines
Diff to previous 1.8 (colored)

Expose pmemrange internal functions via pmemrange.h.
This is so I can move the pig allocator to subr_hibernate.

No functional change.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jul 6 19:50:38 2011 UTC (12 years, 11 months ago) by beck
Branch: MAIN
Changes since 1.7: +45 -2 lines
Diff to previous 1.7 (colored)


uvm changes for buffer cache improvements.
1) Make the pagedaemon aware of the memory ranges and size of allocations
where memory is being requested, and pass this information on to
bufbackoff(), which will later (not yet) be used to ensure that the
buffer cache gets out of the way in the right area of memory.

Note that this commit does not yet make it *do* that - as currently
the buffer cache is all in dma-able memory and it will simply back
off.

2) Add uvm_pagerealloc_multi - to be used by the buffer cache code
for reallocating pages to particular regions.

much of this work by ariane, with smatterings of me, art,and oga

ok oga@, thib@, ariane@, deraadt@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 3 22:07:37 2011 UTC (13 years, 2 months ago) by ariane
Branch: MAIN
Changes since 1.6: +6 -1 lines
Diff to previous 1.6 (colored)

Helper functions for suspend.

Allow reclaiming pages from all pools.
Allow zeroing all pages.
Allocate the more equal pig.

mlarking@ needs this.
Not called yet.

ok mlarkin@, theo@

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 3 14:16:42 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Fix an #ifdef: uvm_pmr_isfree() is also used when DEBUG is defined
Pointed out by Fred Crowson.  ok ariane@

Revision 1.5 / (download) - annotate - [select for diffs], Thu Apr 22 19:02:55 2010 UTC (14 years, 1 month ago) by oga
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Committing on behalf or ariane@.

recommit pmemrange:
        physmem allocator: change the view of free memory from single
        free pages to free ranges.  Classify memory based on region with
        associated use-counter (which is used to construct a priority
        list of where to allocate memory).

	Based on code from tedu@, help from many.

Useable now that bugs have been found and fixed in most architecture's
pmap.c

ok by everyone who has done a pmap or uvm commit in the last year.

Revision 1.4, Tue Jun 16 16:42:41 2009 UTC (14 years, 11 months ago) by ariane
Branch: MAIN
Changes since 1.3: +1 -1 lines
FILE REMOVED

Backout pmemrange (which to most people is more well known as physmem
allocator).

"i can't see any obvious problems" oga

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 14 02:20:23 2009 UTC (15 years ago) by deraadt
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

back out the free vs dirty fix, because pmemrange will go soon too

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 10 20:36:40 2009 UTC (15 years ago) by ariane
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Fix: Clean and dirty pages had the memtype ids and the desparate case failed
to function properly in the fast-allocation path (should not have triggered).

ok: oga, deraadt

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 17:42:33 2009 UTC (15 years ago) by ariane
Branch: MAIN

physmem allocator: change the view of free memory from single free pages
to free ranges.
Classify memory based on region with associated use-counter (which is used
to construct a priority list of where to allocate memory).

Based on code from tedu@, help from many.
Ok art@

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.