CVS log for src/sys/vm/vm_extern.h
Up to [FreeBSD] / src / sys / vm
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.101.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.101.2.1: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Oct 30 05:06:14 2011 UTC (3 months, 1 week ago) by alc
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +1 -1 lines
SVN rev 226928 on 2011-10-30 05:06:14Z by alc Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at eliminating duplicated code in the various pmap implementations. Micro-optimize vm_phys_free_pages(). Introduce vm_phys_free_contig(). It is fast routine for freeing an arbitrary number of physically contiguous pages. In particular, it doesn't require the number of pages to be a power of two. Use "u_long" instead of "unsigned long". Bruce Evans (bde@) has convinced me that the "boundary" parameters to kmem_alloc_contig(), vm_phys_alloc_contig(), and vm_reserv_reclaim_contig() should be of type "vm_paddr_t" and not "u_long". Make this change.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Oct 28 22:36:15 2011 UTC (3 months, 1 week ago) by alc
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +2 -2 lines
SVN rev 226891 on 2011-10-28 22:36:15Z by alc Use "u_long" instead of "unsigned long".
Revision 1.101.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.86.2.7: download - view: text, markup, annotated - select for diffs
Sun Jul 17 10:13:33 2011 UTC (6 months, 3 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.86.2.6: preferred, colored; branchpoint 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86.2.6: +1 -0 lines
SVN rev 224127 on 2011-07-17 10:13:33Z by kib MFC r223914: Extract the code to translate VM error into errno, into an exported function vm_mmap_to_errno(). Sponsored by: The FreeBSD Foundation
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Jul 10 20:49:13 2011 UTC (7 months ago) by kib
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +1 -0 lines
SVN rev 223914 on 2011-07-10 20:49:13Z by kib Extract the code to translate VM error into errno, into an exported function vm_mmap_to_errno(). It is useful for the drivers that implement mmap(2)-like functionality, to be able to return error codes consistent with mmap(2). Sponsored by: The FreeBSD Foundation No objections from: alc MFC after: 1 week
Revision 1.100: download - view: text, markup, annotated - select for diffs
Sat Jul 9 15:21:10 2011 UTC (7 months ago) by kib
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +2 -0 lines
SVN rev 223889 on 2011-07-09 15:21:10Z by kib Add a facility to disable processing page faults. When activated, uiomove generates EFAULT if any accessed address is not mapped, as opposed to handling the fault. Sponsored by: The FreeBSD Foundation Reviewed by: alc (previous version)
Revision 1.99: download - view: text, markup, annotated - select for diffs
Mon Dec 27 07:12:22 2010 UTC (13 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +0 -2 lines
SVN rev 216731 on 2010-12-27 07:12:22Z by alc Move vm_object_print()'s prototype to the expected place.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sat Dec 25 23:54:50 2010 UTC (13 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +0 -1 lines
SVN rev 216701 on 2010-12-25 23:54:50Z by alc Retire vm_fault_quick(). It's no longer used. Reviewed by: kib@
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat Dec 25 21:26:56 2010 UTC (13 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +2 -0 lines
SVN rev 216699 on 2010-12-25 21:26:56Z by alc Introduce and use a new VM interface for temporarily pinning pages. This new interface replaces the combined use of vm_fault_quick() and pmap_extract_and_hold() throughout the kernel. In collaboration with: kib@
Revision 1.78.2.5.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.78.2.5: preferred, colored; next MAIN 1.78.4.1: preferred, colored
Changes since revision 1.78.2.5: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.86.2.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.86.2.6: preferred, colored; next MAIN 1.86.2.7: preferred, colored
Changes since revision 1.86.2.6: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Dec 20 22:49:31 2010 UTC (13 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -0 lines
SVN rev 216604 on 2010-12-20 22:49:31Z by alc Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race condition in proc_rwmem() and to (2) simplify the implementation of the cxgb driver's vm_fault_hold_user_pages(). Specifically, in proc_rwmem() the requested read or write could fail because the targeted page could be reclaimed between the calls to vm_fault() and vm_page_hold(). In collaboration with: kib@ MFC after: 6 weeks
Revision 1.86.2.6: download - view: text, markup, annotated - select for diffs
Sat Nov 27 12:26:40 2010 UTC (14 months, 1 week ago) by jchandra
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.86.2.5: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.5: +1 -0 lines
SVN rev 215938 on 2010-11-27 12:26:40Z by jchandra Merge MIPS platform support to 8-STABLE. This commit merges the MIPS platform changes that was now stable in -CURRENT into 8-STABLE. The MIPS changesets are too many (~400) to list here. But the changesets merged in this commit that affect other platforms are summarized below: r204635 : (changes to sys/dev/hwpmc, lib/libpmc, sys/sys/pmc.h) Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor. r205845: (changes to sys/modules/Makefile) Fix for building modules on mips and arm. r204031: (changes to sys/kern/link_elf_obj.c) printf fix, as part of kernel module support for MIPS. r206404: (changes to sys/arm/include/bus.h) Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the other platforms - for arm and mips. r206819: (changes to sys/vm/) Add VMFS_TLB_ALIGNED_SPACE option and kmem_alloc_nofault_space(), which is used to allocate kernel stack address on MIPS. r208165, r211087: (sys/kern/subr_smp.c, sys/kern/sched_ule.c) Enable ULE scheduler for MIPS, Fix for an issue in SMP when 32 cpus are enabled. r208659: (sys/{ia64/ia64,mips/mips,sun4v/sun4v}/pmap.c) Simplify the inner loop of get_pv_entry() r208794: (changes to sys/vm/) Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig() fails to allocate MIPS page table pages. r210327: (changes to sys/vm/) Support for MIPS page table page allocation. Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist, and other related changes. Reviewed by: alc(vm changes only) Approved by: kib(re), alc(vm), imp(mips), jmallett(mips), gnn(mips pmc)
Revision 1.78.2.5: download - view: text, markup, annotated - select for diffs
Fri Sep 10 21:53:47 2010 UTC (17 months ago) by mdf
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.78.2.4: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.2.4: +1 -0 lines
SVN rev 212437 on 2010-09-10 21:53:47Z by mdf MFC r211194, r211229, r212058, r212063: memguard(9) rewrite r211194: Rework memguard(9) to reserve significantly more KVA to detect use-after-free over a longer time. Also release the backing pages of a guarded allocation at free(9) time to reduce the overhead of using memguard(9). Allow setting and varying the malloc type at run-time. Add knobs to allow: - randomly guarding memory - adding un-backed KVA guard pages to detect underflow and overflow - a lower limit on the size of allocations that are guarded r211229: Fix compile. It seemed better to have memguard.c include opt_vm.h in case future compile-time knobs were added that it wants to use. Also add include guards and forward declarations to vm/memguard.h. r212058: The realloc case for memguard(9) will copy too many bytes when reallocating to a smaller-sized allocation. Fix this issue. r212063: Have memguard(9) crash with an easier-to-debug message on double-free.
Revision 1.86.2.5: download - view: text, markup, annotated - select for diffs
Fri Sep 10 17:26:41 2010 UTC (17 months ago) by mdf
Branches: RELENG_8
Diff to: previous 1.86.2.4: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.4: +1 -0 lines
SVN rev 212427 on 2010-09-10 17:26:41Z by mdf MFC r211194, r211229, r212058, r212063: memguard(9) rewrite r211194: Rework memguard(9) to reserve significantly more KVA to detect use-after-free over a longer time. Also release the backing pages of a guarded allocation at free(9) time to reduce the overhead of using memguard(9). Allow setting and varying the malloc type at run-time. Add knobs to allow: - randomly guarding memory - adding un-backed KVA guard pages to detect underflow and overflow - a lower limit on the size of allocations that are guarded r211229: Fix compile. It seemed better to have memguard.c include opt_vm.h in case future compile-time knobs were added that it wants to use. Also add include guards and forward declarations to vm/memguard.h. r212058: The realloc case for memguard(9) will copy too many bytes when reallocating to a smaller-sized allocation. Fix this issue. r212063: Have memguard(9) crash with an easier-to-debug message on double-free.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:10:37 2010 UTC (17 months, 4 weeks ago) by mdf
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +1 -0 lines
SVN rev 211194 on 2010-08-11 22:10:37Z by mdf Rework memguard(9) to reserve significantly more KVA to detect use-after-free over a longer time. Also release the backing pages of a guarded allocation at free(9) time to reduce the overhead of using memguard(9). Allow setting and varying the malloc type at run-time. Add knobs to allow: - randomly guarding memory - adding un-backed KVA guard pages to detect underflow and overflow - a lower limit on the size of allocations that are guarded Reviewed by: alc Reviewed by: brueffer, Ulrich Spörlein <uqs spoerlein net> (man page) Silence from: -arch Approved by: zml (mentor) MFC after: 1 month
Revision 1.86.2.4.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.86.2.4: preferred, colored; next MAIN 1.86.2.5: preferred, colored
Changes since revision 1.86.2.4: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Apr 18 22:32:07 2010 UTC (21 months, 3 weeks ago) by jmallett
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +1 -0 lines
SVN rev 206819 on 2010-04-18 22:32:07Z by jmallett o) Add a VM find-space option, VMFS_TLB_ALIGNED_SPACE, which searches the address space for an address as aligned by the new pmap_align_tlb() function, which is for constraints imposed by the TLB. [1] o) Add a kmem_alloc_nofault_space() function, which acts like kmem_alloc_nofault() but allows the caller to specify which find-space option to use. [1] o) Use kmem_alloc_nofault_space() with VMFS_TLB_ALIGNED_SPACE to allocate the kernel stack address on MIPS. [1] o) Make pmap_align_tlb() on MIPS align addresses so that they do not start on an odd boundary within the TLB, so that they are suitable for insertion as wired entries and do not have to share a TLB entry with another mapping, assuming they are appropriately-sized. o) Eliminate md_realstack now that the kstack will be appropriately-aligned on MIPS. o) Increase the number of guard pages to 2 so that we retain the proper alignment of the kstack address. Reviewed by: [1] alc X-MFC-after: Making sure alc has not come up with a better interface.
Revision 1.78.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 14 16:54:49 2010 UTC (21 months, 3 weeks ago) by alc
Branches: RELENG_7
Diff to: previous 1.78.2.3: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.3: +3 -1 lines
SVN rev 206609 on 2010-04-14 16:54:49Z by alc MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc().
Revision 1.86.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 14 16:31:59 2010 UTC (21 months, 3 weeks ago) by alc
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.86.2.3: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.3: +3 -1 lines
SVN rev 206607 on 2010-04-14 16:31:59Z by alc MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc().
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Apr 11 16:26:07 2010 UTC (22 months ago) by alc
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +0 -2 lines
SVN rev 206483 on 2010-04-11 16:26:07Z by alc Initialize the virtual memory-related resource limits in a single place. Previously, one of these limits was initialized in two places to a different value in each place. Moreover, because an unsigned int was used to represent the amount of pageable physical memory, some of these limits were incorrectly initialized on 64-bit architectures. (Currently, this error is masked by login.conf's default settings.) Make vm_thread_swapin() and vm_thread_swapout() static. Submitted by: bde (an earlier version) Reviewed by: kib
Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Apr 9 02:39:20 2010 UTC (22 months ago) by alc
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -1 lines
SVN rev 206409 on 2010-04-09 02:39:20Z by alc Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. In particular, like kmem_alloc_contig(), the caller can specify the physical address range from which the physical pages are allocated and the memory attributes (i.e., cache behavior) for these physical pages. However, in contrast to kmem_alloc_contig() or contigmalloc(), the physical pages that are allocated by kmem_alloc_attr() are not necessarily physically contiguous. This function is needed by DRM and VirtualBox. Correct an error in the prototype for kmem_malloc(). The third argument had the wrong type. Tested by: rnoland MFC after: 3 days
Revision 1.86.2.3: download - view: text, markup, annotated - select for diffs
Wed Mar 31 02:43:58 2010 UTC (22 months, 1 week ago) by marcel
Branches: RELENG_8
Diff to: previous 1.86.2.2: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.2: +1 -0 lines
SVN rev 205956 on 2010-03-31 02:43:58Z by marcel
MFC rev 198341 and 198342:
o Introduce vm_sync_icache() for making the I-cache coherent with
the memory or D-cache, depending on the semantics of the platform.
vm_sync_icache() is basically a wrapper around pmap_sync_icache(),
that translates the vm_map_t argumument to pmap_t.
o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc
it replaces the pmap_page_executable() function, added to solve
the I-cache problem in uiomove_fromphys().
o In proc_rwmem() call vm_sync_icache() when writing to a page that
has execute permissions. This assures that when breakpoints are
written, the I-cache will be coherent and the process will actually
hit the breakpoint.
o This also fixes the Book-E PMAP implementation that was missing
necessary locking while trying to deal with the I-cache coherency
in pmap_enter() (read: mmu_booke_enter_locked).
Revision 1.78.2.3.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.78.2.3: preferred, colored; next MAIN 1.78.2.4: preferred, colored
Changes since revision 1.78.2.3: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Nov 18 18:05:54 2009 UTC (2 years, 2 months ago) by alc
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -1 lines
SVN rev 199490 on 2009-11-18 18:05:54Z by alc Simplify both the invocation and the implementation of vm_fault() for wiring pages. (Note: Claims made in the comments about the handling of breakpoints in wired pages have been false for roughly a decade. This and another bug involving breakpoints will be fixed in coming changes.) Reviewed by: kib
Revision 1.86.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.86.2.2: preferred, colored; next MAIN 1.86.2.3: preferred, colored
Changes since revision 1.86.2.2: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Oct 21 18:38:02 2009 UTC (2 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +1 -0 lines
SVN rev 198341 on 2009-10-21 18:38:02Z by marcel
o Introduce vm_sync_icache() for making the I-cache coherent with
the memory or D-cache, depending on the semantics of the platform.
vm_sync_icache() is basically a wrapper around pmap_sync_icache(),
that translates the vm_map_t argumument to pmap_t.
o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc
it replaces the pmap_page_executable() function, added to solve
the I-cache problem in uiomove_fromphys().
o In proc_rwmem() call vm_sync_icache() when writing to a page that
has execute permissions. This assures that when breakpoints are
written, the I-cache will be coherent and the process will actually
hit the breakpoint.
o This also fixes the Book-E PMAP implementation that was missing
necessary locking while trying to deal with the I-cache coherency
in pmap_enter() (read: mmu_booke_enter_locked).
The key property of this change is that the I-cache is made coherent
*after* writes have been done. Doing it in the PMAP layer when adding
or changing a mapping means that the I-cache is made coherent *before*
any writes happen. The difference is key when the I-cache prefetches.
Revision 1.86.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 8 15:31:23 2009 UTC (2 years, 5 months ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.86.2.1: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.1: +0 -2 lines
SVN rev 196977 on 2009-09-08 15:31:23Z by kib MFC r196730: Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Not a merge: instead of removing td_altkstack* members of struct thread, replace them with placeholders to keep struct thread layout on the stable branch. Also, record r196640, r196644 and r196648 as merged. Approved by: re (kensmith)
Revision 1.78.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 4 19:59:32 2009 UTC (2 years, 5 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.78.2.2: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.2: +3 -0 lines
SVN rev 196838 on 2009-09-04 19:59:32Z by jhb
MFC 193396, 193521, 194331, 194337, 194376, 194454, 194562, 194642, 195033,
195385, 195649, 195660, 195749, and 195774:
Add support to the virtual memory system for configuring machine-
dependent memory attributes:
- Refactor contigmalloc() into two functions: a simple front-end that deals
with the malloc tag and calls a new back-end, kmem_alloc_contig(), that
allocates the pages and maps them.
- Use kmem_alloc_contig() to implement the UMA back-end allocator for
jumbo frame zones.
- Use kmem_alloc_contig() to allocate the top-level page tables for PAE.
- Introduce vm_memattr_t to as a type to hold memory attributes.
- Introduce vm_object_set_memattr() for setting the default memory
attributes that will be given to an object's pages.
- Introduce and use pmap_page_{get,set}_memattr() for getting and
setting a page's machine-dependent memory attributes. Add full
support for these functions on amd64 and i386 and stubs for them on
the other architectures. The function pmap_page_set_memattr() is also
responsible for any other machine-dependent aspects of changing a
page's memory attributes, such as flushing the cache or updating the
direct map. The uses include kmem_alloc_contig(), vm_page_alloc(),
and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with
non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes
for the real or fictitious page according to the object's default
memory attributes.
- Update the various pmap functions on amd64 and i386 that map pages to
incorporate each page's memory attributes in the mapping.
Reviewed by: alc
Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue Sep 1 11:41:51 2009 UTC (2 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +0 -2 lines
SVN rev 196730 on 2009-09-01 11:41:51Z by kib Reintroduce the r196640, after fixing the problem with my testing. Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1]. This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size. Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks. Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho (and retested according to new test scenarious) MFC after: 1 week
Revision 1.88: download - view: text, markup, annotated - select for diffs
Sat Aug 29 21:53:08 2009 UTC (2 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -0 lines
SVN rev 196648 on 2009-08-29 21:53:08Z by kib Reverse r196640 and r196644 for now.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Sat Aug 29 13:28:02 2009 UTC (2 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +0 -2 lines
SVN rev 196640 on 2009-08-29 13:28:02Z by kib Remove the altkstacks, instead instantiate threads with kernel stack allocated with the right size from the start. For the thread that has kernel stack cached, verify that requested stack size is equial to the actual, and reallocate the stack if sizes differ [1]. This fixes the bug introduced by r173361 that was committed several days after r173004 and consisted of kthread_add(9) ignoring the non-default kernel stack size. Also, r173361 removed the caching of the kernel stacks for a non-first thread in the process. Introduce separate kernel stack cache that keeps some limited amount of preallocated kernel stacks to lower the latency of thread allocation. Add vm_lowmem handler to prune the cache on low memory condition. This way, system with reasonable amount of the threads get lower latency of thread creation, while still not exhausting significant portion of KVA for unused kstacks. Submitted by: peter [1] Discussed with: jhb, julian, peter Reviewed by: jhb Tested by: pho MFC after: 1 week
Revision 1.86.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Jul 12 23:31:20 2009 UTC (2 years, 6 months ago) by alc
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +1 -1 lines
SVN rev 195649 on 2009-07-12 23:31:20Z by alc
Add support to the virtual memory system for configuring machine-
dependent memory attributes:
Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the
fact that there are machine-dependent memory attributes that have
nothing to do with controlling the cache's behavior.
Introduce vm_object_set_memattr() for setting the default memory
attributes that will be given to an object's pages.
Introduce and use pmap_page_{get,set}_memattr() for getting and
setting a page's machine-dependent memory attributes. Add full
support for these functions on amd64 and i386 and stubs for them on
the other architectures. The function pmap_page_set_memattr() is also
responsible for any other machine-dependent aspects of changing a
page's memory attributes, such as flushing the cache or updating the
direct map. The uses include kmem_alloc_contig(), vm_page_alloc(),
and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with
non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes
for the real or fictitious page according to the object's default
memory attributes.
Update the various pmap functions on amd64 and i386 that map pages to
incorporate each page's memory attributes in the mapping.
Notes: (1) Inherent to this design are safety features that prevent
the specification of inconsistent memory attributes by different
mappings on amd64 and i386. In addition, the device pager provides a
warning when a device driver creates a fictitious page with memory
attributes that are inconsistent with the real page that the
fictitious page is an alias for. (2) Storing the machine-dependent
memory attributes for amd64 and i386 as a dedicated "int" in "struct
md_page" represents a compromise between space efficiency and the ease
of MFCing these changes to RELENG_7.
In collaboration with: jhb
Approved by: re (kib)
Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Jul 3 22:17:37 2009 UTC (2 years, 7 months ago) by kib
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -1 lines
SVN rev 195329 on 2009-07-03 22:17:37Z by kib When forking a vm space that has wired map entries, do not forget to charge the objects created by vm_fault_copy_entry. The object charge was set, but reserve not incremented. Reported by: Greg Rivers <gcr+freebsd-current tharned org> Reviewed by: alc (previous version) Approved by: re (kensmith)
Revision 1.84: download - view: text, markup, annotated - select for diffs
Fri Jun 26 04:47:43 2009 UTC (2 years, 7 months ago) by alc
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +1 -1 lines
SVN rev 195033 on 2009-06-26 04:47:43Z by alc This change is the next step in implementing the cache control functionality required by video card drivers. Specifically, this change introduces vm_cache_mode_t with an appropriate VM_CACHE_DEFAULT definition on all architectures. In addition, this changes adds a vm_cache_mode_t parameter to kmem_alloc_contig() and vm_phys_alloc_contig(). These will be the interfaces for allocating mapped kernel memory and physical memory, respectively, with non-default cache modes. In collaboration with: jhb
Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Jun 25 20:33:45 2009 UTC (2 years, 7 months ago) by svn2cvs
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +1 -1 lines
manual sync of cvs tree due to export bug
Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Jun 18 21:52:39 2009 UTC (2 years, 7 months ago) by svn2cvs
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Manual sync-up to svn rev 194463
Revision 1.78.2.2.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.78.2.2: preferred, colored; next MAIN 1.78.2.3: preferred, colored
Changes since revision 1.78.2.2: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Apr 1 04:36:37 2009 UTC (2 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +0 -13 lines
SVN rev 190604 on 2009-04-01 04:36:37Z by alc Eliminate dead code. Reviewed by: jhb
Revision 1.78.2.2: download - view: text, markup, annotated - select for diffs
Thu Feb 26 15:59:22 2009 UTC (2 years, 11 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.78.2.1: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.1: +2 -1 lines
SVN rev 189075 on 2009-02-26 15:59:22Z by jhb MFC: Add support for "superpages" on amd64 and i386. This includes adding the superpage reservation system to the machine-independent VM system as well as changes to the pmap code for amd64 and i386 to support superpages. Reviewed by: alc Tested by: ps
Revision 1.78.2.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.78.2.1: preferred, colored; next MAIN 1.78.2.2: preferred, colored
Changes since revision 1.78.2.1: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.76.2.2.6.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.76.2.2: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.2: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat May 10 21:46:20 2008 UTC (3 years, 9 months ago) by alc
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -1 lines
Introduce a new parameter "superpage_align" to kmem_suballoc() that is used to request superpage alignment for the submap. Request superpage alignment for the kmem_map. Pass VMFS_ANY_SPACE instead of TRUE to vm_map_find(). (They are currently equivalent but VMFS_ANY_SPACE is the new preferred spelling.) Remove a stale comment from kmem_malloc().
Revision 1.78.4.1: download - view: text, markup, annotated - select for diffs
Sat Jan 19 18:15:07 2008 UTC (4 years ago) by kib
Branches: RELENG_7_0
CVS tags: RELENG_7_0_0_RELEASE
Diff to: previous 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78: +5 -5 lines
MFC fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
The reason for MFCing this so late in release cycle is, according to
marius@, because
> it fixes the crashing (though no panic) of the test suite
> of the graphic/OpenEXR port on sparc64. This test suite is run
> (and required to succeed) during the package build and that's
> why portmgr@ bitch about at it as OpenEXR is a dependency of KDE
> which in turn is supposed to end up on the release CD images.
Revisions MFCed:
1.677 of src/sys/amd64/amd64/machdep.c
1.592 of src/sys/amd64/amd64/pmap.c
1.88 of src/sys/arm/arm/pmap.c
1.27 of src/sys/arm/at91/kb920x_machdep.c
1.22 of src/sys/arm/sa11x0/assabet_machdep.c
1.8 of src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 of src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 of src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 of src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 of src/sys/compat/pecoff/imgact_pecoff.c
1.26 of src/sys/compat/svr4/imgact_svr4.c
1.660 of src/sys/i386/i386/machdep.c
1.596 of src/sys/i386/i386/pmap.c
1.68 of src/sys/i386/ibcs2/imgact_coff.c
1.56 of src/sys/i386/linux/imgact_linux.c
1.226 of src/sys/ia64/ia64/machdep.c
1.192 of src/sys/ia64/ia64/pmap.c
1.102 of src/sys/kern/imgact_aout.c
1.179 of src/sys/kern/imgact_elf.c
1.56 of src/sys/kern/imgact_gzip.c
1.310 of src/sys/kern/kern_exec.c
1.287 of src/sys/kern/kern_fork.c
1.236 of src/sys/kern/kern_kse.c
1.253 of src/sys/kern/kern_proc.c
1.352 of src/sys/kern/kern_sig.c
1.63 of src/sys/kern/kern_thr.c
1.257 of src/sys/kern/kern_thread.c
1.397 of src/sys/pc98/pc98/machdep.c
1.104 of src/sys/powerpc/powerpc/machdep.c
1.10 of src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 of src/sys/sparc64/sparc64/machdep.c
1.167 of src/sys/sparc64/sparc64/pmap.c
1.16 of src/sys/sun4v/sun4v/machdep.c
1.40 of src/sys/sun4v/sun4v/pmap.c
1.493 of src/sys/sys/proc.h
1.78 of src/sys/sys/signalvar.h
1.80 of src/sys/vm/pmap.h
1.79 of src/sys/vm/vm_extern.h
1.226 of src/sys/vm/vm_glue.c
1.390 of src/sys/vm/vm_map.c
Requested by: marius
Tested by: Peter Holm, marius (make universe and sparc64 runs)
Approved by: re (kensmith)
Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 18 10:02:53 2008 UTC (4 years ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
MFC fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
The reason for MFCing this so late in release cycle is, according to
marius@, because
> it fixes the crashing (though no panic) of the test suite
> of the graphic/OpenEXR port on sparc64. This test suite is run
> (and required to succeed) during the package build and that's
> why portmgr@ bitch about at it as OpenEXR is a dependency of KDE
> which in turn is supposed to end up on the release CD images.
Revisions MFCed:
1.677 of src/sys/amd64/amd64/machdep.c
1.592 of src/sys/amd64/amd64/pmap.c
1.88 of src/sys/arm/arm/pmap.c
1.27 of src/sys/arm/at91/kb920x_machdep.c
1.22 of src/sys/arm/sa11x0/assabet_machdep.c
1.8 of src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 of src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 of src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 of src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 of src/sys/compat/pecoff/imgact_pecoff.c
1.26 of src/sys/compat/svr4/imgact_svr4.c
1.660 of src/sys/i386/i386/machdep.c
1.596 of src/sys/i386/i386/pmap.c
1.68 of src/sys/i386/ibcs2/imgact_coff.c
1.56 of src/sys/i386/linux/imgact_linux.c
1.226 of src/sys/ia64/ia64/machdep.c
1.192 of src/sys/ia64/ia64/pmap.c
1.102 of src/sys/kern/imgact_aout.c
1.179 of src/sys/kern/imgact_elf.c
1.56 of src/sys/kern/imgact_gzip.c
1.310 of src/sys/kern/kern_exec.c
1.287 of src/sys/kern/kern_fork.c
1.236 of src/sys/kern/kern_kse.c
1.253 of src/sys/kern/kern_proc.c
1.352 of src/sys/kern/kern_sig.c
1.63 of src/sys/kern/kern_thr.c
1.257 of src/sys/kern/kern_thread.c
1.397 of src/sys/pc98/pc98/machdep.c
1.104 of src/sys/powerpc/powerpc/machdep.c
1.10 of src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 of src/sys/sparc64/sparc64/machdep.c
1.167 of src/sys/sparc64/sparc64/pmap.c
1.16 of src/sys/sun4v/sun4v/machdep.c
1.40 of src/sys/sun4v/sun4v/pmap.c
1.493 of src/sys/sys/proc.h
1.78 of src/sys/sys/signalvar.h
1.80 of src/sys/vm/pmap.h
1.79 of src/sys/vm/vm_extern.h
1.226 of src/sys/vm/vm_glue.c
1.390 of src/sys/vm/vm_map.c
Requested by: marius
Tested by: Peter Holm, marius (make universe and sparc64 runs)
Approved by: re (kensmith)
Revision 1.79: download - view: text, markup, annotated - select for diffs
Mon Nov 5 11:36:16 2007 UTC (4 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
Fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno
int. struct vmspace arg was added to vm_forkproc() to avoid dealing
with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(),
that itself may return NULL. Also, allocation of the first process
thread is performed in the fork1() to properly deal with stack
allocation failure. proc_linkup() is separated into proc_linkup()
called from fork1(), and proc_linkup0(), that is used to set up the
kernel process (was known as swapper).
In collaboration with: Peter Holm
Reviewed by: jhb
Revision 1.76.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 2 00:26:27 2006 UTC (5 years, 8 months ago) by tegge
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Branch point for: RELENG_6_4
Diff to: previous 1.76.2.1: preferred, colored; branchpoint 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.1: +2 -0 lines
MFC: Close race between vmspace_exitfree() and exit1() and races between
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach
to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process. Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
Revision 1.78: download - view: text, markup, annotated - select for diffs
Mon May 29 21:28:56 2006 UTC (5 years, 8 months ago) by tegge
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP
Branch point for: RELENG_7_0, RELENG_7
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -0 lines
Close race between vmspace_exitfree() and exit1() and races between vmspace_exitfree() and vmspace_free() which could result in the same vmspace being freed twice. Factor out part of exit1() into new function vmspace_exit(). Attach to vmspace0 to allow old vmspace to be freed earlier. Add new function, vmspace_acquire_ref(), for obtaining a vmspace reference for a vmspace belonging to another process. Avoid changing vmspace refcount from 0 to 1 since that could also lead to the same vmspace being freed twice. Change vmtotal() and swapout_procs() to use vmspace_acquire_ref(). Reviewed by: alc
Revision 1.76.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 16 00:25:32 2006 UTC (5 years, 10 months ago) by alc
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -0 lines
MFC File Revisions kern/imgact_aout.c 1.100 kern/imgact_elf.c 1.167-1.172, 1.175 kern/imgact_gzip.c 1.55 vm/vm_extern.h 1.77 vm/vm_glue.c 1.214 Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons for making this change: (1) Under heavy load exec_map can fill up causing vm_map_find() to fail. When it fails, the nascent process is aborted (SIGABRT). Whereas, this reimplementation using sf_buf_alloc() sleeps. (2) Although it is possible to sleep on vm_map_find()'s failure until address space becomes available (see kmem_alloc_wait()), using sf_buf_alloc() is faster. Furthermore, the reimplementation uses a CPU private mapping, avoiding a TLB shootdown on multiprocessors. The second argument to vm_map_find() should be NULL instead of 0. Correct a long-standing problem in elfN_map_insert(): In order to copy a page to user space, the user space mapping must allow write access. Eliminate an unneeded (vm_prot_t) parameter from two functions. Eliminate unnecessary uses of a local variable. Maintain the vnode lock throughout elfN_load_file() rather than releasing it and reacquiring it in vrele(). Consequently, there is no reason to increase the reference count on the vm object caching the file's pages. Eliminate unused parameters to elfN_load_file(). Maintain the lock on the vnode for most of exec_elfN_imgact(). Specifically, it is required for the I/O that may be performed by elfN_load_section(). Avoid an obscure deadlock in the a.out, elf, and gzip image activators. Add a comment describing why the deadlock does not occur in the common case and how it might occur in less usual circumstances. Eliminate an unused variable from exec_aout_imgact(). Avoid a vm object reference leak in a rarely used code path. An executable contains at most one PT_INTERP program header. Therefore, the loop that searches for it can terminate after it is found rather than iterating over the entire set of program headers. Eliminate an unneeded initialization. Approved by: re (mux)
Revision 1.77: download - view: text, markup, annotated - select for diffs
Fri Dec 16 18:34:14 2005 UTC (6 years, 1 month ago) by alc
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -0 lines
Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons for making this change: (1) Under heavy load exec_map can fill up causing vm_map_find() to fail. When it fails, the nascent process is aborted (SIGABRT). Whereas, this reimplementation using sf_buf_alloc() sleeps. (2) Although it is possible to sleep on vm_map_find()'s failure until address space becomes available (see kmem_alloc_wait()), using sf_buf_alloc() is faster. Furthermore, the reimplementation uses a CPU private mapping, avoiding a TLB shootdown on multiprocessors. Problem uncovered by: kris@ Reviewed by: tegge@ MFC after: 3 weeks
Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Apr 1 20:00:11 2005 UTC (6 years, 10 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +1 -1 lines
- Change the vm_mmap() function to accept an objtype_t parameter specifying the type of object represented by the handle argument. - Allow vm_mmap() to map device memory via cdev objects in addition to vnodes and anonymous memory. Note that mmaping a cdev directly does not currently perform any MAC checks like mapping a vnode does. - Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the cdev the ioctl is acting on rather than trying to find a suitable vnode to map from. Reviewed by: alc, arch@
Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 5 00:59:57 2005 UTC (7 years ago) by das
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74: +0 -2 lines
MFC: 2004-11-20 02:29:00 UTC Disable U area swapping and remove the routines that create, destroy, copy, and swap U areas.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Nov 20 02:29:00 2004 UTC (7 years, 2 months ago) by das
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +0 -2 lines
Disable U area swapping and remove the routines that create, destroy, copy, and swap U areas. Reviewed by: arch@
Revision 1.46.2.5: download - view: text, markup, annotated - select for diffs
Tue Nov 16 19:48:09 2004 UTC (7 years, 2 months ago) by ps
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11
Diff to: previous 1.46.2.4: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.4: +2 -3 lines
MFC: >alc 2004/05/21 21:53:52 PDT > > FreeBSD src repository > > Modified files: > sys/vm vm_extern.h vm_fault.c vm_map.c vm_page.c > Log: > To date, unwiring a fictitious page has produced a panic. The reason > being that PHYS_TO_VM_PAGE() returns the wrong vm_page for fictitious > pages but unwiring uses PHYS_TO_VM_PAGE(). The resulting panic > reported an unexpected wired count. Rather than attempting to fix > PHYS_TO_VM_PAGE(), this fix takes advantage of the properties of > fictitious pages. Specifically, fictitious pages will never be > completely unwired. Therefore, we can keep a fictitious page's wired > count forever set to one and thereby avoid the use of > PHYS_TO_VM_PAGE() when we know that we're working with a fictitious > page, just not which one. > > In collaboration with: green@, tegge@ > PR: kern/29915 Reviewed by: alc
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Jul 25 20:08:59 2004 UTC (7 years, 6 months ago) by alc
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +0 -1 lines
For years, kmem_alloc_pageable() has been misused. Now that the last of these misuses has been corrected, remove it before new ones appear, such as arm/arm/pmap.c revision 1.8.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat May 22 04:53:51 2004 UTC (7 years, 8 months ago) by alc
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -2 lines
To date, unwiring a fictitious page has produced a panic. The reason being that PHYS_TO_VM_PAGE() returns the wrong vm_page for fictitious pages but unwiring uses PHYS_TO_VM_PAGE(). The resulting panic reported an unexpected wired count. Rather than attempting to fix PHYS_TO_VM_PAGE(), this fix takes advantage of the properties of fictitious pages. Specifically, fictitious pages will never be completely unwired. Therefore, we can keep a fictitious page's wired count forever set to one and thereby avoid the use of PHYS_TO_VM_PAGE() when we know that we're working with a fictitious page, just not which one. In collaboration with: green@, tegge@ PR: kern/29915
Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Apr 6 20:15:36 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +0 -4 lines
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999. Approved by: core
Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Mar 15 06:42:40 2004 UTC (7 years, 10 months ago) by truckman
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +2 -2 lines
Revert to the original vslock() and vsunlock() API with the following exceptions: Retain the recently added vslock() error return. The type of the len argument should be size_t, not u_int. Suggested by: bde
Revision 1.70: download - view: text, markup, annotated - select for diffs
Fri Mar 5 22:03:11 2004 UTC (7 years, 11 months ago) by truckman
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +2 -2 lines
Undo the merger of mlock()/vslock and munlock()/vsunlock() and the
introduction of kern_mlock() and kern_munlock() in
src/sys/kern/kern_sysctl.c 1.150
src/sys/vm/vm_extern.h 1.69
src/sys/vm/vm_glue.c 1.190
src/sys/vm/vm_mmap.c 1.179
because different resource limits are appropriate for transient and
"permanent" page wiring requests.
Retain the kern_mlock() and kern_munlock() API in the revived
vslock() and vsunlock() functions.
Combine the best parts of each of the original sets of implementations
with further code cleanup. Make the mclock() and vslock()
implementations as similar as possible.
Retain the RLIMIT_MEMLOCK check in mlock(). Move the most strigent
test, which can return EAGAIN, last so that requests that have no
hope of ever being satisfied will not be retried unnecessarily.
Disable the test that can return EAGAIN in the vslock() implementation
because it will cause the sysctl code to wedge.
Tested by: Cy Schubert <Cy.Schubert AT komquats.com>
Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Feb 26 00:27:04 2004 UTC (7 years, 11 months ago) by truckman
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -2 lines
Split the mlock() kernel code into two parts, mlock(), which unpacks the syscall arguments and does the suser() permission check, and kern_mlock(), which does the resource limit checking and calls vm_map_wire(). Split munlock() in a similar way. Enable the RLIMIT_MEMLOCK checking code in kern_mlock(). Replace calls to vslock() and vsunlock() in the sysctl code with calls to kern_mlock() and kern_munlock() so that the sysctl code will obey the wired memory limits. Nuke the vslock() and vsunlock() implementations, which are no longer used. Add a member to struct sysctl_req to track the amount of memory that is wired to handle the request. Modify sysctl_wire_old_buffer() to return an error if its call to kern_mlock() fails. Only wire the minimum of the length specified in the sysctl request and the length specified in its argument list. It is recommended that sysctl handlers that use sysctl_wire_old_buffer() should specify reasonable estimates for the amount of data they want to return so that only the minimum amount of memory is wired no matter what length has been specified by the request. Modify the callers of sysctl_wire_old_buffer() to look for the error return. Modify sysctl_old_user to obey the wired buffer length and clean up its implementation. Reviewed by: bms
Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed Jan 14 06:21:38 2004 UTC (8 years ago) by alc
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +0 -1 lines
Remove vm_page_alloc_contig(). It's now unused.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Jan 11 06:59:21 2004 UTC (8 years, 1 month ago) by alc
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +0 -1 lines
Remove long dead code, specifically, code related to munmapfd(). (See also vm/vm_mmap.c revision 1.173.)
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Oct 5 12:41:08 2003 UTC (8 years, 4 months ago) by bms
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -0 lines
Revert previous commit. Come back vslock(), all is forgiven. Pointy hat to: bms
Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Oct 5 09:47:54 2003 UTC (8 years, 4 months ago) by bms
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +0 -2 lines
Retire vslock() and vsunlock() with extreme prejudice. Discussed with: pete
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Aug 15 12:04:29 2003 UTC (8 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +0 -1 lines
Make swaponvp() static to the swap_pager.
Revision 1.46.2.4: download - view: text, markup, annotated - select for diffs
Sat Aug 9 16:21:20 2003 UTC (8 years, 6 months ago) by luoqi
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.46.2.3: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.3: +1 -1 lines
MFC: PAE support, based on Jake Burkholder's work in current. Jake's work was sponsored by DARPA, Network Associates Laboratories. Major changes include: - introduction of vm_paddr_t to represent physical address - support for page directory pointer table - removal of (recursive) alternative address space Reviewed by: jake
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jun 14 23:23:55 2003 UTC (8 years, 7 months ago) by alc
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +5 -1 lines
Migrate the thread stack management functions from the machine-dependent to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms. Two details: 1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0. 2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab().
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jun 14 06:20:25 2003 UTC (8 years, 7 months ago) by alc
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -0 lines
Move the *_new_altkstack() and *_dispose_altkstack() functions out of the various pmap implementations into the machine-independent vm. They were all identical.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Mar 25 00:07:05 2003 UTC (8 years, 10 months ago) by jake
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -1 lines
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue Jan 21 11:34:57 2003 UTC (9 years ago) by alfred
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +4 -4 lines
use 'void *' instead of 'caddr_t' for useracc, kernacc, vslock and vsunlock.
Revision 1.46.2.3: download - view: text, markup, annotated - select for diffs
Mon Jan 13 22:51:17 2003 UTC (9 years ago) by dillon
Branches: RELENG_4
CVS tags: RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8
Diff to: previous 1.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.2: +2 -0 lines
primarily MFC vm_map.c 1.275. Also pull-in vm_waitproc() and cpu_wait() changes from current. This should close reference count races with the vmspace structure. There is still a shmexit() race (structure never freed) which will be addressed in a day or two with a fix MFC from current.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Jul 24 19:47:56 2002 UTC (9 years, 6 months ago) by alc
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -2 lines
o Merge vm_fault_wire() and vm_fault_user_wire() by adding a new parameter, user_wire.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Jul 20 02:56:12 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -1 lines
Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable handler in the kernel at the same time. Also, allow for the exec_new_vmspace() code to build a different sized vmspace depending on the executable environment. This is a big help for execing i386 binaries on ia64. The ELF exec code grows the ability to map partial pages when there is a page size difference, eg: emulating 4K pages on 8K or 16K hardware pages. Flesh out the i386 emulation support for ia64. At this point, the only binary that I know of that fails is cvsup, because the cvsup runtime tries to execute code in pages not marked executable. Obtained from: dfr (mostly, many tweaks from me).
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Jul 7 23:05:27 2002 UTC (9 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -0 lines
Collect all the (now equivalent) pmap_new_proc/pmap_dispose_proc/ pmap_swapin_proc/pmap_swapout_proc functions from the MD pmap code and use a single equivalent MI version. There are other cleanups needed still. While here, use the UMA zone hooks to keep a cache of preinitialized proc structures handy, just like the thread system does. This eliminates one dependency on 'struct proc' being persistent even after being freed. There are some comments about things that can be factored out into ctor/dtor functions if it is worth it. For now they are mostly just doing statistics to get a feel of how it is working.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Apr 5 00:52:15 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +0 -1 lines
o Eliminate the use of grow_stack() and useracc() from sendsig(), osendsig(), and osf1_sendsig(). o Eliminate the prototype for the MD grow_stack() now that it has been removed from all platforms.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Mar 26 05:30:59 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +0 -1 lines
Remove an unused prototype.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Mar 19 22:17:45 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +48 -48 lines
Remove __P.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Mar 10 21:52:46 2002 UTC (9 years, 11 months ago) by eivind
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +1 -3 lines
- Remove a number of extra newlines that do not belong here according to style(9) - Minor space adjustment in cases where we have "( ", " )", if(), return(), while(), for(), etc. - Add /* SYMBOL */ after a few #endifs. Reviewed by: alc
Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Feb 7 20:58:47 2002 UTC (10 years ago) by julian
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +1 -1 lines
Pre-KSE/M3 commit. this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Feb 5 21:23:05 2002 UTC (10 years ago) by alfred
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -0 lines
Fix a race with free'ing vmspaces at process exit when vmspaces are shared. Also introduce vm_endcopy instead of using pointer tricks when initializing new vmspaces. The race occured because of how the reference was utilized: test vmspace reference, possibly block, decrement reference When sharing a vmspace between multiple processes it was possible for two processes exiting at the same time to test the reference count, possibly block and neither one free because they wouldn't see the other's update. Submitted by: green
Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 14 17:22:53 2001 UTC (10 years, 2 months ago) by iedowse
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +1 -2 lines
MFC: move the code for calculating the system load average into kern_synch.c. Add jitter to the timing of samples to avoid synchronisation with processes that run periodically.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Oct 20 13:10:43 2001 UTC (10 years, 3 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -2 lines
Move the code that computes the system load average from vm_meter.c to kern_synch.c in preparation for adding some jitter to the inter-sample time. Note that the "vm.loadavg" sysctl still lives in vm_meter.c which isn't the right place, but it is appropriate for the current (bad) name of that sysctl. Suggested by: jhb (some time ago) Reviewed by: bde
Revision 1.49: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:38:11 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +14 -14 lines
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Sep 10 04:28:58 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -2 lines
Rip some well duplicated code out of cpu_wait() and cpu_exit() and move it to the MI area. KSE touched cpu_wait() which had the same change replicated five ways for each platform. Now it can just do it once. The only MD parts seemed to be dealing with fpu state cleanup and things like vm86 cleanup on x86. The rest was identical. XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional stub in place. Reviewed by: jake, tmm, dillon
Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 2 22:15:09 2000 UTC (11 years, 6 months ago) by peter
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4, RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
MFC: eliminate useless (and unused) third arg to vsunlock().
Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Mar 13 10:47:24 2000 UTC (11 years, 11 months ago) by phk
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
Remove unused 3rd argument from vsunlock() which abused B_WRITE.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Dec 29 04:55:09 1999 UTC (12 years, 1 month ago) by peter
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3 lines
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Nov 8 00:53:34 1999 UTC (12 years, 3 months ago) by alc
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +1 -5 lines
Remove unused declarations.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Sep 20 19:08:48 1999 UTC (12 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
Fix bug in pipe code relating to writes of mmap'd but illegal address
spaces which cross a segment boundry in the page table. pmap_kextract()
is not designed for access to the user space portion of the page
table and cannot handle the null-page-directory-entry case.
The fix is to have vm_fault_quick() return a success or failure which
is then used to avoid calling pmap_kextract().
Revision 1.15.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:39:04 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.27.2.3: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:24:21 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.27.2.2: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.2: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.39.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:33:29 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.39.2.1: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.1: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:52:35 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Jun 8 17:03:27 1999 UTC (12 years, 8 months ago) by dt
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -1 lines
Add a function kmem_alloc_nofault() - same as kmem_alloc_pageable(), but create a nofault entry. It will be used to allocate kmem for upages. (I am not too happy with all this, but it's better than nothing).
Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Apr 13 19:17:15 1999 UTC (12 years, 10 months ago) by peter
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -2 lines
Move the declaration of faultin() from the vm headers to proc.h, since it is now referenced from a macro there (PHOLD()).
Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Wed Jan 27 20:51:43 1999 UTC (13 years ago) by julian
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -4 lines
MFC: Linux threads support is now default, to match -current Recompile the usual suspects!
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Jan 26 02:49:52 1999 UTC (13 years ago) by julian
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -4 lines
Mostly remove the VM_STACK OPTION. This changes the definitions of a few items so that structures are the same whether or not the option itself is enabled. This allows people to enable and disable the option without recompilng the world. As the author says: |I ran into a problem pulling out the VM_STACK option. I was aware of this |when I first did the work, but then forgot about it. The VM_STACK stuff |has some code changes in the i386 branch. There need to be corresponding |changes in the alpha branch before it can come out completely. what is done: | |1) Pull the VM_STACK option out of the header files it appears in. This |really shouldn't affect anything that executes with or without the rest |of the VM_STACK patches. The vm_map_entry will then always have one |extra element (avail_ssize). It just won't be used if the VM_STACK |option is not turned on. | |I've also pulled the option out of vm_map.c. This shouldn't harm anything, |since the routines that are enabled as a result are not called unless |the VM_STACK option is enabled elsewhere. | |2) Add what appears to be appropriate code the the alpha branch, still |protected behind the VM_STACK switch. I don't have an alpha machine, |so we would need to get some testers with alpha machines to try it out. | |Once there is some testing, we can consider making the change permanent |for both i386 and alpha. | [..] | |Once the alpha code is adequately tested, we can pull VM_STACK out |everywhere. | Submitted by: "Richard Seaman, Jr." <dick@tar.com>
Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Jan 6 23:05:41 1999 UTC (13 years, 1 month ago) by julian
Branches: MAIN
CVS tags: RELENG_3_BP
Branch point for: RELENG_3
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -1 lines
Add (but don't activate) code for a special VM option to make downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
Revision 1.27.2.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 01:30:53 1998 UTC (13 years, 4 months ago) by jdp
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.1: +2 -2 lines
Merge in the fix for the "GDB touches executables" problem. The following revisions are included in this merge: 1.89 src/sys/i386/i386/trap.c 1.24,1.25 src/sys/miscfs/procfs/procfs_mem.c 1.32 src/sys/vm/vm_extern.h 1.67 src/sys/vm/vm_fault.c 1.73 src/sys/vm/vm_map.c 1.25 src/sys/vm/vm_map.h 1.8 src/sys/vm/vm_prot.h PR: kern/3475, kern/7858
Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Jun 7 17:13:09 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE, PRE_NOBDEV
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Jan 22 17:30:32 1998 UTC (14 years ago) by dyson
Branches: MAIN
CVS tags: PRE_SOFTUPDATE, PRE_DEVFS_SLICE, POST_SOFTUPDATE, POST_DEVFS_SLICE
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
VM level code cleanups. 1) Start using TSM. Struct procs continue to point to upages structure, after being freed. Struct vmspace continues to point to pte object and kva space for kstack. u_map is now superfluous. 2) vm_map's don't need to be reference counted. They always exist either in the kernel or in a vmspace. The vmspaces are managed by reference counts. 3) Remove the "wired" vm_map nonsense. 4) No need to keep a cache of kernel stack kva's. 5) Get rid of strange looking ++var, and change to var++. 6) Change more data structures to use our "zone" allocator. Added struct proc, struct vmspace and struct vnode. This saves a significant amount of kva space and physical memory. Additionally, this enables TSM for the zone managed memory. 7) Keep ioopt disabled for now. 8) Remove the now bogus "single use" map concept. 9) Use generation counts or id's for data structures residing in TSM, where it allows us to avoid unneeded restart overhead during traversals, where blocking might occur. 10) Account better for memory deficits, so the pageout daemon will be able to make enough memory available (experimental.) 11) Fix some vnode locking problems. (From Tor, I think.) 12) Add a check in ufs_lookup, to avoid lots of unneeded calls to bcmp. (experimental.) 13) Significantly shrink, cleanup, and make slightly faster the vm_fault.c code. Use generation counts, get rid of unneded collpase operations, and clean up the cluster code. 14) Make vm_zone more suitable for TSM. This commit is partially as a result of discussions and contributions from other people, including DG, Tor Egge, PHK, and probably others that I have forgotten to attribute (so let me know, if I forgot.) This is not the infamous, final cleanup of the vnode stuff, but a necessary step. Vnode mgmt should be correct, but things might still change, and there is still some missing stuff (like ioopt, and physical backing of non-merged cache files, debugging of layering concepts.)
Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Dec 31 02:35:29 1997 UTC (14 years, 1 month ago) by alex
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
caddr_t --> void *
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Dec 6 02:23:27 1997 UTC (14 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2 lines
Support an optional, sysctl enabled feature of idle process swapout. This is apparently useful for large shell systems, or systems with long running idle processes. To enable the feature: sysctl -w vm.swap_idle_enabled=1 Please note that some of the other vm sysctl variables have been renamed to be more accurate. Submitted by: Much of it from Matt Dillon <dillon@best.net>
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Apr 13 01:48:33 1997 UTC (14 years, 10 months ago) by dyson
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge, WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -1 lines
Fully implement vfork. Vfork is now much much faster than even our fork. (On my machine, fork is about 240usecs, vfork is 78usecs.) Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory from the other threads of a group. Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating possible existing shares with other threads/processes. Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a thread from the rest of the group. Fix the case where a thread does an exec. It is almost nonsense for a thread to modify the other threads address space by an exec, so we now automatically divorce the address space before modifying it.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Apr 7 07:16:04 1997 UTC (14 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
The biggie: Get rid of the UPAGES from the top of the per-process address space. (!) Have each process use the kernel stack and pcb in the kvm space. Since the stacks are at a different address, we cannot copy the stack at fork() and allow the child to return up through the function call tree to return to user mode - create a new execution context and have the new process begin executing from cpu_switch() and go to user mode directly. In theory this should speed up fork a bit. Context switch the tss_esp0 pointer in the common tss. This is a lot simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer to each process's tss since the esp0 pointer is a 32 bit pointer, and the sd_base setting is split into three different bit sections at non-aligned boundaries and requires a lot of twiddling to reset. The 8K of memory at the top of the process space is now empty, and unmapped (and unmappable, it's higher than VM_MAXUSER_ADDRESS). Simplity the pmap code to manage process contexts, we no longer have to double map the UPAGES, this simplifies and should measuably speed up fork(). The following parts came from John Dyson: Set PG_G on the UPAGES that are now in kernel context, and invalidate them when swapping them out. Move the upages object (upobj) from the vmspace to the proc structure. Now that the UPAGES (pcb and kernel stack) are out of user space, make rfork(..RFMEM..) do what was intended by sharing the vmspace entirely via reference counting rather than simply inheriting the mappings.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Apr 6 02:30:56 1997 UTC (14 years, 10 months ago) by dyson
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
Correction to the prototype for vm_fault.
Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 25 04:54:22 1997 UTC (14 years, 10 months ago) by dyson
Branches: RELENG_2_2
CVS tags: RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1 lines
1. Fix the vm_page_zero_count accounting. This should improve the
performance of the pre-zero loop.
2. Fix madvise. It had a myriad of bugs, including the potential
for system crashes.
3. Improve vm_map handling. This is a result of work done by both
<alc@cs.rice.edu> (Alan Cox) and me. Earlier versions of the
map handling code was very unintelligent about map coalescing.
4. Support a working and closer to POSIX mlock.
5. A couple of performance enhancements that came along for the ride,
including changing certain bitfields to flags in vm_map.
6. Bring procfs up to date with respect to the changes.
This code has been carefully extracted from -current.
Reviewed by: David Greenman <dg@freebsd.org>
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:48:11 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Feb 10 02:22:14 1997 UTC (15 years ago) by dyson
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -1 lines
This is the kernel Lite/2 commit. There are some requisite userland changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:57:23 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$ 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.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Dec 14 17:54:12 1996 UTC (15 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1 lines
Implement closer-to POSIX mlock semantics. The major difference is that we do allow mlock to span unallocated regions (of course, not mlocking them.) We also allow mlocking of RO regions (which the old code couldn't.) The restriction there is that once a RO region is wired (mlocked), it cannot be debugged (or EVER written to.) Under normal usage, the new mlock code will be a significant improvement over our old stuff.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Sep 15 11:24:21 1996 UTC (15 years, 4 months ago) by bde
Branches: MAIN
CVS tags: RELENG_2_2_BP, RELENG_2_2_0_RELEASE
Branch point for: RELENG_2_2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -2 lines
Removed iprintf(). It was copied to db_iprintf() in ddb.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Sep 14 11:54:54 1996 UTC (15 years, 4 months ago) by bde
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +1 -4 lines
Attached vm ddb commands `show map', `show vmochk', `show object', `show vmopag', `show page' and `show pageq'. Moved all vm ddb stuff to the ends of the vm source files. Changed printf() to db_printf(), `indent' to db_indent, and iprintf() to db_iprintf() in ddb commands. Moved db_indent and db_iprintf() from vm to ddb. vm_page.c: Don't use __pure. Staticized. db_output.c: Reduced page width from 80 to 79 to inhibit double spacing for long lines (there are still some problems if words are printed across column 79).
Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu May 2 09:34:50 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -6 lines
KGDB is dead. It may come back one day if somebody does it.
Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Mar 11 19:53:54 1996 UTC (15 years, 11 months ago) by peter
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +9 -9 lines
Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all files are off the vendor branch, so this should not change anything. A "U" marker generally means that the file was not changed in between the 4.4Lite and Lite-2 releases, and does not need a merge. "C" generally means that there was a change.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Feb 23 18:49:23 1996 UTC (15 years, 11 months ago) by peter
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
kern_descrip.c: add fdshare()/fdcopy() kern_fork.c: add the tiny bit of code for rfork operation. kern/sysv_*: shmfork() takes one less arg, it was never used. sys/shm.h: drop "isvfork" arg from shmfork() prototype sys/param.h: declare rfork args.. (this is where OpenBSD put it..) sys/filedesc.h: protos for fdshare/fdcopy. vm/vm_mmap.c: add minherit code, add rounding to mmap() type args where it makes sense. vm/*: drop unused isvfork arg. Note: this rfork() implementation copies the address space mappings, it does not connect the mappings together. ie: once the two processes have split, the pages may be shared, but the address space is not. If one does a mmap() etc, it does not appear in the other. This makes it not useful for pthreads, but it is useful in it's own right for having light-weight threads in a static shared address space. Obtained from: Original by Ron Minnich, extended by OpenBSD
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Feb 4 22:08:57 1996 UTC (16 years ago) by dyson
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -1 lines
Changed vm_fault_quick in vm_machdep.c to be global. Needed for new pipe code.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Dec 14 09:54:55 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -3 lines
Another mega commit to staticize things.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Dec 11 04:58:04 1995 UTC (16 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -5 lines
Changes to support 1Tb filesizes. Pages are now named by an (object,index) pair instead of (object,offset) pair.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Dec 7 12:48:08 1995 UTC (16 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -1 lines
Untangled the vm.h include file spaghetti.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Nov 14 09:29:29 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -2 lines
Move all the VM sysctl stuff home where it belongs.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Aug 28 09:19:21 1995 UTC (16 years, 5 months ago) by julian
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -3 lines
Reviewed by: julian with quick glances by bruce and others 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.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:48:19 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -23 lines
NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct
proc or any VM system structure will have to be rebuilt!!!
Much needed overhaul of the VM system. Included in this first round of
changes:
1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages,
haspage, and sync operations are supported. The haspage interface now
provides information about clusterability. All pager routines now take
struct vm_object's instead of "pagers".
2) Improved data structures. In the previous paradigm, there is constant
confusion caused by pagers being both a data structure ("allocate a
pager") and a collection of routines. The idea of a pager structure has
escentially been eliminated. Objects now have types, and this type is
used to index the appropriate pager. In most cases, items in the pager
structure were duplicated in the object data structure and thus were
unnecessary. In the few cases that remained, a un_pager structure union
was created in the object to contain these items.
3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now
be removed. For instance, vm_object_enter(), vm_object_lookup(),
vm_object_remove(), and the associated object hash list were some of the
things that were removed.
4) simple_lock's removed. Discussion with several people reveals that the
SMP locking primitives used in the VM system aren't likely the mechanism
that we'll be adopting. Even if it were, the locking that was in the code
was very inadequate and would have to be mostly re-done anyway. The
locking in a uni-processor kernel was a no-op but went a long way toward
making the code difficult to read and debug.
5) Places that attempted to kludge-up the fact that we don't have kernel
thread support have been fixed to reflect the reality that we are really
dealing with processes, not threads. The VM system didn't have complete
thread support, so the comments and mis-named routines were just wrong.
We now use tsleep and wakeup directly in the lock routines, for instance.
6) Where appropriate, the pagers have been improved, especially in the
pager_alloc routines. Most of the pager_allocs have been rewritten and
are now faster and easier to maintain.
7) The pagedaemon pageout clustering algorithm has been rewritten and
now tries harder to output an even number of pages before and after
the requested page. This is sort of the reverse of the ideal pagein
algorithm and should provide better overall performance.
8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup
have been removed. Some other unnecessary casts have also been removed.
9) Some almost useless debugging code removed.
10) Terminology of shadow objects vs. backing objects straightened out.
The fact that the vm_object data structure escentially had this
backwards really confused things. The use of "shadow" and "backing
object" throughout the code is now internally consistent and correct
in the Mach terminology.
11) Several minor bug fixes, including one in the vm daemon that caused
0 RSS objects to not get purged as intended.
12) A "default pager" has now been created which cleans up the transition
of objects to the "swap" type. The previous checks throughout the code
for swp->pg_data != NULL were really ugly. This change also provides
the rudiments for future backing of "anonymous" memory by something
other than the swap pager (via the vnode pager, for example), and it
allows the decision about which of these pagers to use to be made
dynamically (although will need some additional decision code to do
this, of course).
13) (dyson) MAP_COPY has been deprecated and the corresponding "copy
object" code has been removed. MAP_COPY was undocumented and non-
standard. It was furthermore broken in several ways which caused its
behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will
continue to work correctly, but via the slightly different semantics
of MAP_PRIVATE.
14) (dyson) Sharing maps have been removed. It's marginal usefulness in a
threads design can be worked around in other ways. Both #12 and #13
were done to simplify the code and improve readability and maintain-
ability. (As were most all of these changes)
TODO:
1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing
this will reduce the vnode pager to a mere fraction of its current size.
2) Rewrite vm_fault and the swap/vnode pagers to use the clustering
information provided by the new haspage pager interface. This will
substantially reduce the overhead by eliminating a large number of
VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be
improved to provide both a "behind" and "ahead" indication of
contiguousness.
3) Implement the extended features of pager_haspage in swap_pager_haspage().
It currently just says 0 pages ahead/behind.
4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps
via a much more general mechanism that could also be used for disk
striping of regular filesystems.
5) Do something to improve the architecture of vm_object_collapse(). The
fact that it makes calls into the swap pager and knows too much about
how the swap pager operates really bothers me. It also doesn't allow
for collapsing of non-swap pager objects ("unnamed" objects backed by
other pagers).
Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Jul 10 08:53:16 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
swapout_threads() -> swapout_procs().
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun May 14 03:00:09 1995 UTC (16 years, 9 months ago) by davidg
Branches: MAIN
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE, RELENG_2_1_0_RELEASE, RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5_ALPHA, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -3 lines
Changed swap partition handling/allocation so that it doesn't
require specific partitions be mentioned in the kernel config
file ("swap on foo" is now obsolete).
From Poul-Henning:
The visible effect is this:
As default, unless
options "NSWAPDEV=23"
is in your config, you will have four swap-devices.
You can swapon(2) any block device you feel like, it doesn't have
to be in the kernel config.
There is a performance/resource win available by getting the NSWAPDEV right
(but only if you have just one swap-device ??), but using that as default
would be too restrictive.
The invisible effect is that:
Swap-handling disappears from the $arch part of the kernel.
It gets a lot simpler (-145 lines) and cleaner.
Reviewed by: John Dyson, David Greenman
Submitted by: Poul-Henning Kamp, with minor changes by me.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed May 10 18:56:04 1995 UTC (16 years, 9 months ago) by davidg
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Changed "handle" from type caddr_t to void *; "handle" is several different types of pointers, and "char *" is a bad choice for the type.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:17:08 1995 UTC (16 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -2 lines
Add and move declarations to fix all of the warnings from `gcc -Wimplicit' (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Feb 21 01:32:47 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -2 lines
vm_extern.h: removed vm_allocate_with_pager. Removed vm_user.c...it's now completely deprecated.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Feb 20 23:58:09 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +1 -4 lines
Removed vm_allocate(), vm_deallocate(), and vm_protect() functions. The only function remaining in this file is vm_allocate_with_pager(), and this will be going RSN. The file will be removed when this happens.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Feb 20 18:08:17 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -2 lines
vm_inherit function has been deprecated.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Feb 9 14:16:07 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -5 lines
Killed MACHVMCOMPAT function prototypes as the functions don't exist.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Jan 9 16:05:38 1995 UTC (17 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +75 -79 lines
These changes embody the support of the fully coherent merged VM buffer cache, much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Dec 30 08:02:16 1994 UTC (17 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -7 lines
Clean up previous commits (format for 80 columns...).
Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Sep 27 18:00:26 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
CVS tags: RELEASE_2_0, OLAH_TTCP, BETA_2_0, ALPHA_2_0
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
1) New "vm_page_alloc_contig" routine by me. 2) Created a new vm_page flag "PG_FREE" to help track free pages. 3) Use PG_FREE flag to detect inconsistencies in a few places.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Sep 2 15:06:50 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
Whoops, accidently left out some pieces of the munmapfd patch.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Aug 21 07:19:44 1994 UTC (17 years, 5 months ago) by paul
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -1 lines
Made idempotent Reviewed by: Submitted by:
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:55:17 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -0 lines
Added $Id$
Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 25 09:18:50 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +11 -1 lines
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch. Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:09:50 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources
Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:09:49 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision
