OpenBSD CVS

CVS log for src/sys/uvm/Attic/uvm_pglist.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.39, Thu Jun 23 21:50:26 2011 UTC (12 years, 11 months ago) by oga
Branch: MAIN
CVS Tags: HEAD
Changes since 1.38: +1 -1 lines
FILE REMOVED

Move uvm_pglistalloc and uvm_pglistfree to uvm_page.c and garbage
college uvm_pglist.c

uvm_pglistalloc and free are just thin wrappers around pmemrange these
days and don't really need their own file.

ok ariane@

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jun 27 03:03:49 2010 UTC (13 years, 11 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.37: +0 -1 lines
Diff to previous 1.37 (colored)

uvm constraints. Add two mandatory MD symbols, uvm_md_constraints
which contains the constraints for DMA/memory allocation for each
architecture, and dma_constraints which contains the range of addresses
that are dma accessable by the system.

This is based on ariane@'s physcontig diff, with lots of bugfixes and
additions the following additions by my self:

Introduce a new function pool_set_constraints() which sets the address
range for which we allocate pages for the pool from, this is now used
for the mbuf/mbuf cluster pools to keep them dma accessible.

The !direct archs no longer stuff pages into the kernel object in
uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.

Tested heavily by my self on i386, amd64 and sparc64. Some tests on
alpha and SGI.

"commit it" beck, art, oga, deraadt
"i like the diff" deraadt

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jun 10 08:48:36 2010 UTC (13 years, 11 months ago) by thib
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

fix typos in comments: lineair -> linear.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Apr 22 19:02:55 2010 UTC (14 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.35: +28 -319 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Thu Aug 13 15:29:59 2009 UTC (14 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.34: +7 -1 lines
Diff to previous 1.34 (colored)

PAGEFASTRECYCLE is an option we have been using for a while to encourage
the kernel to reuse freed pages as quickly as possible, and it has been
finding bugs (some of which we have already fixed)
ok kettenis

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 26 21:26:10 2009 UTC (14 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +1 -1 lines
Diff to previous 1.33 (colored)

stop trying to fast-recycle pages for now.  a few bugs have been found and
fixed, but now it is time for a little break from the chaos.
ok kettenis

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 23 21:39:10 2009 UTC (14 years, 10 months ago) by kettenis
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Insert free pages at the head of the page queues.  Should provide better
cache locality and will pave the way for the new pmemrange allocator.
Based on hints from art@ and ariane@.

ok ariane@, deraadt@, oga@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 17 00:13:59 2009 UTC (14 years, 11 months ago) by oga
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

date based reversion of uvm to the 4th May.

More backouts in line with previous ones, this appears to bring us back to a
stable condition.

A machine forced to 64mb of ram cycled 10GB through swap with this diff
and is still running as I type this. Other tests by ariane@ and thib@
also seem to show that it's alright.

ok deraadt@, thib@, ariane@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 16 16:42:41 2009 UTC (14 years, 11 months ago) by ariane
Branch: MAIN
Changes since 1.30: +301 -23 lines
Diff to previous 1.30 (colored)

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

"i can't see any obvious problems" oga

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 1 17:42:33 2009 UTC (15 years ago) by ariane
Branch: MAIN
Changes since 1.29: +24 -302 lines
Diff to previous 1.29 (colored)

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@

Revision 1.29 / (download) - annotate - [select for diffs], Mon May 4 18:08:06 2009 UTC (15 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Instead of keeping two ints in the uvm structure specifically just to
sleep on them (and otherwise ignore them) sleep on the pointer to the
{aiodoned,pagedaemon}_proc members, and nuke the two extra words.

"no objections" art@, ok beck@.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Apr 30 09:06:01 2009 UTC (15 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

obvious typo in panic string.

ariane@ ok.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Apr 20 00:30:18 2009 UTC (15 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.26: +16 -5 lines
Diff to previous 1.26 (colored)

add the UVM_PLA_ZERO flag for uvm_pglistalloc to make it return zeroed
pages.

"go for it" miod@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 14 16:01:04 2009 UTC (15 years, 1 month ago) by oga
Branch: MAIN
Changes since 1.25: +7 -2 lines
Diff to previous 1.25 (colored)

Convert the waitok field of uvm_pglistalloc to "flags", more will be added soon.

For the possibility of sleeping, the first two flags are UVM_PLA_WAITOK
and UVM_PLA_NOWAIT. It is an error not to show intention, so assert that
one of the two is provided. Switch over every caller in the tree to
using the appropriate flag.

ok art@, ariane@

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 20 15:19:04 2009 UTC (15 years, 2 months ago) by oga
Branch: MAIN
Changes since 1.24: +3 -6 lines
Diff to previous 1.24 (colored)

While working on some stuff in uvm I've gotten REALLY sick of reading
K&R function declarations, so switch them all over to ansi-style, in
accordance with the prophesy.

"go for it" art@

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Fri Nov 7 19:24:19 2008 UTC (15 years, 6 months ago) by brad
Branch: OPENBSD_4_4
Changes since 1.23: +7 -1 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

In uvm_pglistalloc(), do not fall through the success code if we could not find
a suitable range and ran out of memory segments. Oops.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Oct 1 20:00:32 2008 UTC (15 years, 8 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.23: +7 -1 lines
Diff to previous 1.23 (colored)

In uvm_pglistalloc(), do not fall through the success code if we could not find
a suitable range and ran out of memory segments. Oops.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jun 27 17:25:47 2008 UTC (15 years, 11 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE
Branch point for: OPENBSD_4_4
Changes since 1.22: +107 -81 lines
Diff to previous 1.22 (colored)

uvm_pglistalloc() works by walking the physical address range it gets invoked
with, trying to find free pages matching the callers requirement.

However, on systems with noncontiguous memory and large gaps between
segments, this is a disaster as soon as one of these gaps is hit.

Rewrite the logic by iterating on the physsegs, and the on the intersection
of the physseg range and the callers range. This also frees us from having
to check whether a given page range crosses a physseg.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 26 05:42:20 2008 UTC (15 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.21: +1 -8 lines
Diff to previous 1.21 (colored)

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 18 11:05:52 2007 UTC (16 years, 5 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.20: +9 -10 lines
Diff to previous 1.20 (colored)

Turn the uvm_{lock/unlock}_fpageq() inlines into
macros that just expand into the mutex functions
to keep the abstraction, do assorted cleanup.

ok miod@,art@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Apr 13 18:57:49 2007 UTC (17 years, 1 month ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.19: +6 -8 lines
Diff to previous 1.19 (colored)

While splitting flags and pqflags might have been a good idea in theory
to separate locking, on most modern machines this is not enough
since operations on short types touch other short types that share the
same word in memory.

Merge pg_flags and pqflags again and now use atomic operations to change
the flags. Also bump wire_count to an int and pg_version might go
int as well, just for alignment.

tested by many, many. ok miod@

Revision 1.19 / (download) - annotate - [select for diffs], Wed Apr 4 17:44:45 2007 UTC (17 years, 2 months ago) by art
Branch: MAIN
Changes since 1.18: +9 -9 lines
Diff to previous 1.18 (colored)

Mechanically rename the "flags" and "version" fields in struct vm_page
to "pg_flags" and "pg_version", so that they are a bit easier to work with.
Whoever uses generic names like this for a popular struct obviously doesn't
read much code.

Most architectures compile and there are no functionality changes.

deraadt@ ok ("if something fails to compile, we fix that by hand")

Revision 1.18 / (download) - annotate - [select for diffs], Mon Feb 12 11:43:47 2007 UTC (17 years, 3 months ago) by tom
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

Let this compile with 'option DEBUG' again.

ok dim@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 16 13:36:38 2007 UTC (17 years, 4 months ago) by dim
Branch: MAIN
Changes since 1.16: +92 -1 lines
Diff to previous 1.16 (colored)

Implement multiple segment allocation for uvm_pglistalloc, which fixes
most agp_generic_bind_memory failures when memory is limited and very
fragmented.

In effect, this should fix a lot of X startup crashes after
activities that exercise memory a lot (e.g. make builds, building big
ports, etc).

ok mickey, miod

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jun 1 05:16:49 2006 UTC (18 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored)

Make umv_pglistalloc() return EINVAL if it is asked for 0 bytes. This
will prevent panics in, e.g., bus_dmamem_alloc().

ok jason@ art@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 16 13:11:06 2006 UTC (18 years, 4 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.14: +13 -1 lines
Diff to previous 1.14 (colored)

add another uvm histroy for physpage alloc/free and propagate a debugging pgfree check into pglist; no functional change for normal kernels; make histories uncommon

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Mon Nov 4 18:02:33 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.11.2.2: +306 -97 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Huge sync to NetBSD plus lots of bugfixes.
 - uvm is as in netbsd-current minus uvm_map forward merge.
 - various locking bugfixes in nfs.
 - make sure that all specops and fifoops are correct in all vnodeop vectors.
 - make the filesystem code more like filsystem code and less like vm code.

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:50 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.11.2.1: +1 -1 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

sync to -current

Revision 1.14 / (download) - annotate - [select for diffs], Mon Oct 7 18:35:52 2002 UTC (21 years, 8 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.13: +1 -3 lines
Diff to previous 1.13 (colored)

this removes the functionality of adding allocated
pages into the queue already containing allocated pages.
breaks i386:setup_buffers() because of this.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Oct 6 22:04:41 2002 UTC (21 years, 8 months ago) by art
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Initialize the result list in uvm_pglistalloc.

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Wed Mar 6 02:17:14 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.3.4.5: +22 -19 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Merge in trunk

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sat Feb 2 03:28:27 2002 UTC (22 years, 4 months ago) by art
Branch: UBC
Changes since 1.11: +27 -34 lines
Diff to previous 1.11 (colored)

Merge in UBC performance changes from NetBSD.
Fix a bunch of merge errors from yesterday.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:07 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +22 -19 lines
Diff to previous 1.11 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Wed Dec 5 01:23:58 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.3.4.4: +19 -22 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored)

Merge in -current

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 28 19:28:15 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.10: +20 -23 lines
Diff to previous 1.10 (colored)

Sync in more uvm from NetBSD. Mostly just cosmetic stuff.
Contains also support for page coloring.

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:02:31 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.3.4.3: +22 -37 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored)

merge in -current

Revision 1.10 / (download) - annotate - [select for diffs], Mon Nov 12 01:26:10 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.9: +6 -14 lines
Diff to previous 1.9 (colored)

Bring in more changes from NetBSD. Mostly pagedaemon improvements.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 7 02:55:50 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.8: +19 -24 lines
Diff to previous 1.8 (colored)

Another sync of uvm to NetBSD. Just minor fiddling, no major changes.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Nov 6 01:35:04 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.7: +2 -4 lines
Diff to previous 1.7 (colored)

Move the last content from vm/ to uvm/
The only thing left in vm/ are just dumb wrappers.
vm/vm.h includes uvm/uvm_extern.h
vm/pmap.h includes uvm/uvm_pmap.h
vm/vm_page.h includes uvm/uvm_page.h

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:32:14 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.3.4.2: +24 -20 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.7 / (download) - annotate - [select for diffs], Sat Aug 11 10:57:22 2001 UTC (22 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.6: +24 -20 lines
Diff to previous 1.6 (colored)

Various random fixes from NetBSD.
Including support for zeroing pages in the idle loop (not enabled yet).

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:47:48 2001 UTC (23 years ago) by niklas
Branch: SMP
Changes since 1.3.4.1: +3 -2 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.6 / (download) - annotate - [select for diffs], Thu Mar 8 15:21:37 2001 UTC (23 years, 3 months ago) by smart
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Replace thread_wakeup() with wakeup().  It is defined in vm_extern.h as a
wrapper, so this removes a dependence on the old VM system.  From NetBSD.
art@ ok

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 29 02:07:48 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
Changes since 1.4: +1 -0 lines
Diff to previous 1.4 (colored)

$OpenBSD$

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:51 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3: +5 -9 lines
Diff to previous 1.3 (colored)

Sync with -current

Revision 1.4 / (download) - annotate - [select for diffs], Thu Mar 16 22:11:05 2000 UTC (24 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.3: +5 -9 lines
Diff to previous 1.3 (colored)

Bring in some new UVM code from NetBSD (not current).

 - Introduce a new type of map that are interrupt safe and never allow faults
   in them. mb_map and kmem_map are made intrsafe.
 - Add "access protection" to uvm_vslock (to be passed down to uvm_fault and
   later to pmap_enter).
 - madvise(2) now works.
 - various cleanups.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Aug 23 08:13:25 1999 UTC (24 years, 9 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

sync with NetBSD from 1999.05.24 (there is a reason for this date)
 Mostly cleanups, but also a few improvements to pagedaemon for better
 handling of low memory and/or low swap conditions.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 26 05:32:08 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

add OpenBSD tags

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 26 01:30:17 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN

Import of uvm from NetBSD. Some local changes, some code disabled

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.