History log of /freebsd/sys/vm/vm_map.c (Results 226 – 250 of 5179)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: vendor/libc++/r185801, vendor/libcxxrt/2013-07-08-c61efa043b14378efbd69c9a2686d44ed46ae179, vendor/v4l/2.6.34.14, vendor/hyperv/20130627, vendor/acpica/20130626, vendor/wpa/2.0, vendor/subversion/subversion-1.8.0
# 5b3e0257 18-Jun-2013 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix a bug that allowed a tracing process (e.g. gdb) to write
to a memory-mapped file in the traced process's address space
even if neither the traced process nor the tracing process had
write access

Fix a bug that allowed a tracing process (e.g. gdb) to write
to a memory-mapped file in the traced process's address space
even if neither the traced process nor the tracing process had
write access to that file.

Security: CVE-2013-2171
Security: FreeBSD-SA-13:06.mmap
Approved by: so

show more ...


Revision tags: vendor/sqlite3/sqlite-3071700, vendor/subversion/subversion-1.8.0-rc3, vendor/serf/serf-1.2.1, vendor/apr-util/apr-util-1.4.1, vendor/apr/apr-1.4.6, vendor/dialog/1.2-20130523, vendor/clang/clang-release_33-r183502, vendor/llvm/llvm-release_33-r183502, vendor/NetBSD/bmake/20130604, release/8.4.0, vendor/byacc/20130304, vendor/tcpdump/4.4.0, vendor/libpcap/1.4.0, vendor/compiler-rt/compiler-rt-r182741
# 9af6d512 21-May-2013 Attilio Rao <attilio@FreeBSD.org>

o Relax locking assertions for vm_page_find_least()
o Relax locking assertions for pmap_enter_object() and add them also
to architectures that currently don't have any
o Introduce VM_OBJECT_LOCK_DO

o Relax locking assertions for vm_page_find_least()
o Relax locking assertions for pmap_enter_object() and add them also
to architectures that currently don't have any
o Introduce VM_OBJECT_LOCK_DOWNGRADE() which is basically a downgrade
operation on the per-object rwlock
o Use all the mechanisms above to make vm_map_pmap_enter() to work
mostl of the times only with readlocks.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc

show more ...


Revision tags: vendor/NetBSD/bmake/20130520, vendor/acpica/20130517, vendor/openssh/6.2p2, vendor/libregex/glibc-2.17, vendor/less/v458, vendor/tnftp/20130505, vendor/zlib/1.2.8, vendor/hyperv/20130502, vendor/flex/2.5.37, vendor/qcamain_open_hal/60390a9f9ac6a20db168fbbc01a4ad4e01c395ce, vendor/libc++/r180598, vendor/libcxxrt/2013-04-22-c812a07cd2f95c1403baf0bbe0366e7618d1d6d3, vendor/sendmail/8.14.7, vendor/tzdata/tzdata2013c, vendor/acpica/20130418, vendor/netcat/5.3
# b9781cf6 09-Apr-2013 Konstantin Belousov <kib@FreeBSD.org>

Fix the assertions for the state of the object under the map entry
with the MAP_ENTRY_VN_WRITECNT flag:
- Move the assertion that verifies the state of the v_writecount and
vnp.writecount, under th

Fix the assertions for the state of the object under the map entry
with the MAP_ENTRY_VN_WRITECNT flag:
- Move the assertion that verifies the state of the v_writecount and
vnp.writecount, under the block where the object is locked.
- Check that the object type is OBJT_VNODE before asserting.

Reported by: avg
Reviewed by: alc
MFC after: 1 week

show more ...


Revision tags: vendor/NetBSD/mtree/20130408, vendor/clang/clang-trunk-r178860, vendor/llvm/llvm-trunk-r178860, vendor/unbound/1.4.20, vendor/acpica/20130328, vendor/NetBSD/bmake/20130330, vendor/bind9/9.8.4-P2, zfs-0.6.1, vendor/openssh/6.2p1, vendor/libarchive/3.1.2, vendor/tzdata/tzdata2013b
# 89f6b863 09-Mar-2013 Attilio Rao <attilio@FreeBSD.org>

Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pa

Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
- VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
- VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
- VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
- VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
(in order to avoid visibility of implementation details)
- The read-mode operations are added:
VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
sys/mutex.h in consumers directly to cater its inlining functions
using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
the compat layer because the name clash between FreeBSD and solaris
versions must be avoided.
At this purpose zfs redefines the vm_object locking functions
directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit. Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: pjd (ZFS specific review)
Discussed with: alc
Tested by: pho

show more ...


Revision tags: vendor/openssl/0.9.8y, vendor/libyaml/0.1.4
# a4915c21 26-Feb-2013 Attilio Rao <attilio@FreeBSD.org>

Merge from vmc-playground branch:
Replace the sub-optimal uma_zone_set_obj() primitive with more modern
uma_zone_reserve_kva(). The new primitive reserves before hand
the necessary KVA space to cate

Merge from vmc-playground branch:
Replace the sub-optimal uma_zone_set_obj() primitive with more modern
uma_zone_reserve_kva(). The new primitive reserves before hand
the necessary KVA space to cater the zone allocations and allocates pages
with ALLOC_NOOBJ. More specifically:
- uma_zone_reserve_kva() does not need an object to cater the backend
allocator.
- uma_zone_reserve_kva() can cater M_WAITOK requests, in order to
serve zones which need to do uma_prealloc() too.
- When possible, uma_zone_reserve_kva() uses directly the direct-mapping
by uma_small_alloc() rather than relying on the KVA / offset
combination.

The removal of the object attribute allows 2 further changes:
1) _vm_object_allocate() becomes static within vm_object.c
2) VM_OBJECT_LOCK_INIT() is removed. This function is replaced by
direct calls to mtx_init() as there is no need to export it anymore
and the calls aren't either homogeneous anymore: there are now small
differences between arguments passed to mtx_init().

Sponsored by: EMC / Isilon storage division
Reviewed by: alc (which also offered almost all the comments)
Tested by: pho, jhb, davide

show more ...


Revision tags: vendor/expat/2.1.0, vendor/NetBSD/unvis/20130221, vendor/NetBSD/vis/20130221, vendor/NetBSD/libc-vis/20130221, vendor/acpica/20130214, vendor/ldns/1.6.16, vendor/openssl/1.0.1e, vendor/libc++/r174563, zfs-0.6.0-rc14, vendor/NetBSD/bmake/20130123, vendor/libcxxrt/2013-01-21-c4b68a5c1836b9027fe8784fec25b7a2e6e6aa60, vendor/compiler-rt/compiler-rt-r172839, vendor/acpica/20130117
# 1cc20081 14-Jan-2013 Andrey Zonov <zont@FreeBSD.org>

- Get rid of unused function vmspace_wired_count().

Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week


Revision tags: vendor/libcxxrt/2013-01-11-b9db3a010143160624f123763025ab544b69bd9a
# 3ac7d297 10-Jan-2013 Andrey Zonov <zont@FreeBSD.org>

- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor

- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

show more ...


Revision tags: vendor/one-true-awk/20121220, vendor/acpica/20121220, vendor/sendmail/8.14.6, vendor/clang/clang-release_32-r170710, vendor/llvm/llvm-release_32-r170710, vendor/xz/5.0.4, vendor/NetBSD/mknod/20122112, vendor/NetBSD/mtree/20122112, zfs-0.6.0-rc13
# 7e19eda4 18-Dec-2012 Andrey Zonov <zont@FreeBSD.org>

- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

Reviewed by: avg, trasz
Approved by: kib (mentor)
MFC after: 1 week


Revision tags: vendor/bind9/9.6-ESV-R8, vendor/openbsm/1.2-ALPHA-3, vendor/NetBSD/libc-vis/20121214a, vendor/NetBSD/libc-vis/20121214
# 28634820 09-Dec-2012 Alan Cox <alc@FreeBSD.org>

In the past four years, we've added two new vm object types. Each time,
similar changes had to be made in various places throughout the machine-
independent virtual memory layer to support the new v

In the past four years, we've added two new vm object types. Each time,
similar changes had to be made in various places throughout the machine-
independent virtual memory layer to support the new vm object type.
However, in most of these places, it's actually not the type of the vm
object that matters to us but instead certain attributes of its pages.
For example, OBJT_DEVICE, OBJT_MGTDEVICE, and OBJT_SG objects contain
fictitious pages. In other words, in most of these places, we were
testing the vm object's type to determine if it contained fictitious (or
unmanaged) pages.

To both simplify the code in these places and make the addition of future
vm object types easier, this change introduces two new vm object flags
that describe attributes of the vm object's pages, specifically, whether
they are fictitious or unmanaged.

Reviewed and tested by: kib

show more ...


Revision tags: vendor/bind9/9.8.4-P1, vendor/bind9/9.8.4, vendor/less/v456, vendor/clang/clang-release_32-r168974, vendor/llvm/llvm-release_32-r168974, vendor/openbsm/1.2-ALPHA-2, release/9.1.0, vendor/libc++/r168853
# a922d312 25-Nov-2012 Alan Cox <alc@FreeBSD.org>

Make a few small changes to vm_map_pmap_enter():

Add detail to the comment describing this function. In particular,
describe what MAP_PREFAULT_PARTIAL does.

Eliminate the abrupt change in behavior

Make a few small changes to vm_map_pmap_enter():

Add detail to the comment describing this function. In particular,
describe what MAP_PREFAULT_PARTIAL does.

Eliminate the abrupt change in behavior when the specified address range
grows from MAX_INIT_PT pages to MAX_INIT_PT plus one pages. Instead of
doing nothing, i.e., preloading no mappings whatsoever, map any resident
pages that fall within the start of the specified address range, i.e.,
[addr, addr + ulmin(size, ptoa(MAX_INIT_PT))).

Long ago, the vm object's list of resident pages was not ordered, so
this function had to choose between probing the global hash table of
all resident pages and iterating over the vm object's unordered list of
resident pages. Now, the list is ordered, so there is no reason for
MAP_PREFAULT_PARTIAL to be concerned with the vm object's count of
resident changes.

MFC after: 14 days

show more ...


Revision tags: vendor/NetBSD/bmake/20121111, vendor/acpica/20121114, zfs-0.6.0-rc12, vendor/tzdata/tzdata2012j, vendor/libc++/r167493, vendor/tzdata/tzdata2012i
# 2ebcd458 12-Nov-2012 Attilio Rao <attilio@FreeBSD.org>

Fix DDB command "show map XXX":
- Check that an argument is always available, otherwise current map
printing before to recurse is garbage.
- Spit out a message if an argument is not provided.
- Rem

Fix DDB command "show map XXX":
- Check that an argument is always available, otherwise current map
printing before to recurse is garbage.
- Spit out a message if an argument is not provided.
- Remove unread nlines variable.
- Use an explicit recursive function, disassociated from the
DB_SHOW_COMMAND() body, in order to make clear prototype and recursion
of the above mentioned function. The code results now much less
obscure.

Submitted by: gianni

show more ...


Revision tags: vendor/less/v453, vendor/pciids/pciids-20121024, vendor/tzdata/tzdata2012h, vendor/NetBSD/bmake/20121010, vendor/netcat/5.2, vendor/libc++/r165949, vendor/tzdata/tzdata2012g, vendor/dialog/1.1-20120706, vendor/acpica/20121018, vendor/mandoc/1.12.1, vendor/bind9/9.6-ESV-R7-P4, vendor/bind9/9.8.3-P4, vendor/NetBSD/libc-vis/20121005, vendor/NetBSD/libc-pwcache/20121005, vendor/tcpdump/4.3.0, vendor/libpcap/1.3.0, vendor/NetBSD/libedit/2012-09-25, vendor/bind9/9.6-ESV-R7-P3, vendor/bind9/9.8.3-P3, zfs-0.6.0-rc11, vendor/acpica/20120913, vendor/tzdata/tzdata2012f, vendor/NetBSD/bmake/20120831, vendor/atf/atf-0.16
# cfe52ecf 03-Sep-2012 Andrey Zonov <zont@FreeBSD.org>

- After r240026 sgrowsiz should be used in a safer maner.

Approved by: kib (mentor)
MCF after: 1 week


Revision tags: vendor/openssh/6.1p1, vendor/openssh/6.0p1, vendor/clang/clang-trunk-r162107, vendor/llvm/llvm-trunk-r162107, vendor/acpica/20120816, vendor/clang/clang-trunk-r161861, vendor/llvm/llvm-trunk-r161861, zfs-0.6.0-rc10, vendor/compiler-rt/compiler-rt-r160957, vendor/libarchive/3.0.4, vendor/bind9/9.6-ESV-R7-P2, vendor/bind9/9.8.3-P2, vendor/dtc/dtc-f807af19, vendor/less/v451, vendor/illumos/20120614, vendor/illumos/20100818, vendor/opensolaris/20100818, vendor/openssl/1.0.1c, vendor/acpica/20120711, vendor/NetBSD/bmake/20120704, vendor/unbound/1.4.17, vendor/ldns/1.6.13, vendor/gcc/4.2.4-20080519-SVN135556-libstdc++, vendor/openssl/0.9.8x
# e30df26e 27-Jun-2012 Alan Cox <alc@FreeBSD.org>

Add new pmap layer locks to the predefined lock order. Change the names
of a few existing VM locks to follow a consistent naming scheme.


Revision tags: vendor/less/v449, vendor/NetBSD/bmake/20120620
# 6fbe60fa 20-Jun-2012 John Baldwin <jhb@FreeBSD.org>

Move the per-thread deferred user map entries list into a private list
in vm_map_process_deferred() which is then iterated to release map entries.
This avoids having a nested vm map unlock operation

Move the per-thread deferred user map entries list into a private list
in vm_map_process_deferred() which is then iterated to release map entries.
This avoids having a nested vm map unlock operation called from the loop
body attempt to recuse into vm_map_process_deferred(). This can happen if
the vm_map_remove() triggers the OOM killer.

Reviewed by: alc, kib
MFC after: 1 week

show more ...


Revision tags: vendor/acpica/20120620, vendor/zlib/1.2.7, zfs-0.6.0-rc9
# 83ce0853 10-Jun-2012 Konstantin Belousov <kib@FreeBSD.org>

Use the previous stack entry protection and max protection to correctly
propagate the stack execution permissions when stack is grown down.

First, curproc->p_sysent->sv_stackprot specifies maximum a

Use the previous stack entry protection and max protection to correctly
propagate the stack execution permissions when stack is grown down.

First, curproc->p_sysent->sv_stackprot specifies maximum allowed stack
protection for current ABI, so the new stack entry was typically marked
executable always. Second, for non-main stack MAP_STACK mapping,
the PROT_ flags should be used which were specified at the mmap(2) call
time, and not sv_stackprot.

MFC after: 1 week

show more ...


Revision tags: vendor/NetBSD/bmake/20120606, vendor/bind9/9.6-ESV-R7-P1, vendor/bind9/9.8.3-P1, vendor/byacc/20120526, vendor/bind9/9.6-ESV-R7, vendor/bind9/9.8.3, vendor/openpam/MICRAMPELIS, vendor/clang/clang-release_31-r156863, vendor/llvm/llvm-release_31-r156863, vendor/clang/clang-release_31-r156748, vendor/llvm/llvm-release_31-r156748, vendor/acpica/20120518, vendor/tcpdump/4.2.1, vendor/pciids/pciids-20120507, vendor/dtracetoolkit/dtracetoolkit-20120512
# 13458803 10-May-2012 Alan Cox <alc@FreeBSD.org>

Give vm_fault()'s sequential access optimization a makeover.

There are two aspects to the sequential access optimization: (1) read ahead
of pages that are expected to be accessed in the near future

Give vm_fault()'s sequential access optimization a makeover.

There are two aspects to the sequential access optimization: (1) read ahead
of pages that are expected to be accessed in the near future and (2) unmap
and cache behind of pages that are not expected to be accessed again. This
revision changes both aspects.

The read ahead optimization is now more effective. It starts with the same
initial read window as before, but arithmetically grows the window on
sequential page faults. This can yield increased read bandwidth. For
example, on one of my machines, a program using mmap() to read a file that
is several times larger than the machine's physical memory takes about 17%
less time to complete.

The unmap and cache behind optimization is now more selectively applied.
The read ahead window must grow to its maximum size before unmap and cache
behind is performed. This significantly reduces the number of times that
pages are unmapped and cached only to be reactivated a short time later.

The unmap and cache behind optimization now clears each page's referenced
flag. Previously, in the case of dirty pages, if the containing file was
still mapped at the time that the page daemon examined the dirty pages,
they would be reactivated.

From a stylistic standpoint, this revision also cleanly separates the
implementation of the read ahead and unmap/cache behind optimizations.

Glanced at: kib
MFC after: 2 weeks

show more ...


Revision tags: vendor/netcat/5.1, vendor/clang/clang-release_31-r155985, vendor/llvm/llvm-release_31-r155985, vendor/libc++/r156067, vendor/byacc/20120115, vendor/acpica/20120420, vendor/clang/clang-trunk-r154661, vendor/llvm/llvm-trunk-r154661, vendor/file/5.11, release/8.3.0_cvs, release/8.3.0, vendor/heimdal/1.5.2, vendor/bind9/9.6-ESV-R6, vendor/bind9/9.8.2, zfs-0.6.0-rc8, vendor/tzdata/tzdata2012a, vendor/acpica/20120320, vendor/libcxxrt/2012-03-20-cddcf8734ed06ada9384a461bc21d58b44f6eba1
# 92a59946 19-Mar-2012 John Baldwin <jhb@FreeBSD.org>

Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms. While

Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms. While here, change
vm_object_madvise() to accept two vm_pindex_t parameters (start and end)
rather than a (start, count) tuple to match other VM APIs as suggested
by alc@.

show more ...


# 126d6082 17-Mar-2012 Konstantin Belousov <kib@FreeBSD.org>

In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
if the filesystem performed short write and we are skipping the page
due to this.

Propogate write error from the pager back to th

In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
if the filesystem performed short write and we are skipping the page
due to this.

Propogate write error from the pager back to the callers of
vm_pageout_flush(). Report the failure to write a page from the
requested range as the FALSE return value from vm_object_page_clean(),
and propagate it back to msync(2) to return EIO to usermode.

While there, convert the clearobjflags variable in the
vm_object_page_clean() and arguments of the helper functions to
boolean.

PR: kern/165927
Reviewed by: alc
MFC after: 2 weeks

show more ...


Revision tags: zfs-0.6.0-rc7, vendor/libc++/r152718, vendor/libc++/r152501, vendor/libcxxrt/2011-11-22-a35d8de85ffd4df32e2dc47fa539d61fd3024a54, vendor/octeon-sdk/2.3.0
# 79e53838 25-Feb-2012 Alan Cox <alc@FreeBSD.org>

Simplify vmspace_fork()'s control flow by copying immutable data before
the vm map locks are acquired. Also, eliminate redundant initialization
of the new vm map's timestamp.

Reviewed by: kib
MFC a

Simplify vmspace_fork()'s control flow by copying immutable data before
the vm map locks are acquired. Also, eliminate redundant initialization
of the new vm map's timestamp.

Reviewed by: kib
MFC after: 3 weeks

show more ...


# 84110e7e 23-Feb-2012 Konstantin Belousov <kib@FreeBSD.org>

Account the writeable shared mappings backed by file in the vnode
v_writecount. Keep the amount of the virtual address space used by
the mappings in the new vm_object un_pager.vnp.writemappings
coun

Account the writeable shared mappings backed by file in the vnode
v_writecount. Keep the amount of the virtual address space used by
the mappings in the new vm_object un_pager.vnp.writemappings
counter. The vnode v_writecount is incremented when writemappings gets
non-zero value, and decremented when writemappings is returned to
zero.

Writeable shared vnode-backed mappings are accounted for in vm_mmap(),
and vm_map_insert() is instructed to set MAP_ENTRY_VN_WRITECNT flag on
the created map entry. During deferred map entry deallocation,
vm_map_process_deferred() checks for MAP_ENTRY_VN_WRITECOUNT and
decrements writemappings for the vm object.

Now, the writeable mount cannot be demoted to read-only while
writeable shared mappings of the vnodes from the mount point
exist. Also, execve(2) fails for such files with ETXTBUSY, as it
should be.

Noted by: tegge
Reviewed by: tegge (long time ago, early version), alc
Tested by: pho
MFC after: 3 weeks

show more ...


Revision tags: vendor/tcsh/6.18.01, vendor/acpica/20120215
# 8211bd45 11-Feb-2012 Konstantin Belousov <kib@FreeBSD.org>

Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.
Other thread might execute vmspace_fork() in between (e.g. by fork(

Close a race due to dropping of the map lock between creating map entry
for a shared mapping and marking the entry for inheritance.
Other thread might execute vmspace_fork() in between (e.g. by fork(2)),
resulting in the mapping becoming private.

Noted and reviewed by: alc
MFC after: 1 week

show more ...


Revision tags: vendor/zlib/1.2.6, vendor/libpcap/1.2.1, vendor/libarchive/2.8, vendor/NetBSD/softfloat/20120117, vendor/acpica/20120111, vendor/compiler-rt/compiler-rt-r147467, release/9.0.0, vendor/xz-embedded/48f4588342f4a4e0182a6740e25675fd8e6c6295, vendor/compiler-rt/compiler-rt-r147390, vendor/netcat/5.0, vendor/openpam/LYCOPSIDA, vendor/clang/clang-r145349, vendor/llvm/llvm-r145349, vendor/gperf/3.0.3, vendor/flex/2.5.35, vendor/libcxxrt/8931d9e5180830a5433d16ae6b3ad8dd9e629512, vendor/libcxxrt/1be67aa8295314fb794c4e933d9bb7c7c33e0ca4, vendor/acpica/20111123, vendor/libcxxrt/9802a7e430e08b90bf0e92d24abff095fa72ec21
# 9fde98bb 21-Nov-2011 Attilio Rao <attilio@FreeBSD.org>

Introduce the same mutex-wise fix in r227758 for sx locks.

The functions that offer file and line specifications are:
- sx_assert_
- sx_downgrade_
- sx_slock_
- sx_slock_sig_
- sx_sunlock_
- sx_try_

Introduce the same mutex-wise fix in r227758 for sx locks.

The functions that offer file and line specifications are:
- sx_assert_
- sx_downgrade_
- sx_slock_
- sx_slock_sig_
- sx_sunlock_
- sx_try_slock_
- sx_try_xlock_
- sx_try_upgrade_
- sx_unlock_
- sx_xlock_
- sx_xlock_sig_
- sx_xunlock_

Now vm_map locking is fully converted and can avoid to know specifics
about locking procedures.
Reviewed by: kib
MFC after: 1 month

show more ...


# ccdf2333 20-Nov-2011 Attilio Rao <attilio@FreeBSD.org>

Introduce macro stubs in the mutex implementation that will be always
defined and will allow consumers, willing to provide options, file and
line to locking requests, to not worry about options redef

Introduce macro stubs in the mutex implementation that will be always
defined and will allow consumers, willing to provide options, file and
line to locking requests, to not worry about options redefining the
interfaces.
This is typically useful when there is the need to build another
locking interface on top of the mutex one.

The introduced functions that consumers can use are:
- mtx_lock_flags_
- mtx_unlock_flags_
- mtx_lock_spin_flags_
- mtx_unlock_spin_flags_
- mtx_assert_
- thread_lock_flags_

Spare notes:
- Likely we can get rid of all the 'INVARIANTS' specification in the
ppbus code by using the same macro as done in this patch (but this is
left to the ppbus maintainer)
- all the other locking interfaces may require a similar cleanup, where
the most notable case is sx which will allow a further cleanup of
vm_map locking facilities
- The patch should be fully compatible with older branches, thus a MFC
is previewed (infact it uses all the underlying mechanisms already
present).

Comments review by: eadler, Ben Kaduk
Discussed with: kib, jhb
MFC after: 1 month

show more ...


Revision tags: vendor/bind9/9.4-ESV-R5-P1, vendor/bind9/9.6-ESV-R5-P1, vendor/bind9/9.8.1-P1, vendor/tzdata/tzdata2011n, vendor/tzdata/tzdata2011m, vendor/clang/clang-r142614, vendor/llvm/llvm-r142614, vendor/tzdata/tzdata2011l, zfs-0.6.0-rc6, vendor/heimdal/1.5.1, vendor/com_err/1.5.1, vendor/file/5.09, vendor/heimdal/1.5, vendor/openssh/5.9p1, vendor/acpica/20110922, vendor/openresolv/3.4.4, vendor/bind9/9.8.1, vendor/one-true-awk/20110810, vendor/one-true-awk/20110807, vendor/bind9/9.4-ESV-R5, vendor/bind9/9.6-ESV-R5, vendor/clang/clang-r135360, vendor/llvm/llvm-r135360, vendor/pciids/pciids-20110716, vendor/bind9/9.8.0-P4, vendor/dialog/1.1-20110707, zfs-0.6.0-rc5
# afcc55f3 06-Jul-2011 Edward Tomasz Napierala <trasz@FreeBSD.org>

All the racct_*() calls need to happen with the proc locked. Fixing this
won't happen before 9.0. This commit adds "#ifdef RACCT" around all the
"PROC_LOCK(p); racct_whatever(p, ...); PROC_UNLOCK(p

All the racct_*() calls need to happen with the proc locked. Fixing this
won't happen before 9.0. This commit adds "#ifdef RACCT" around all the
"PROC_LOCK(p); racct_whatever(p, ...); PROC_UNLOCK(p)" instances, in order
to avoid useless locking/unlocking in kernels built without "options RACCT".

show more ...


Revision tags: vendor/bind9/9.6-ESV-R4-P3
# 6bbee8e2 29-Jun-2011 Alan Cox <alc@FreeBSD.org>

Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing this
option to vm_object_page_remove() asserts that the specified range of pages
is not mapped, or more precisely that none of

Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing this
option to vm_object_page_remove() asserts that the specified range of pages
is not mapped, or more precisely that none of these pages have any managed
mappings. Thus, vm_object_page_remove() need not call pmap_remove_all() on
the pages.

This change not only saves time by eliminating pointless calls to
pmap_remove_all(), but it also eliminates an inconsistency in the use of
pmap_remove_all() versus related functions, like pmap_remove_write(). It
eliminates harmless but pointless calls to pmap_remove_all() that were being
performed on PG_UNMANAGED pages.

Update all of the existing assertions on pmap_remove_all() to reflect this
change.

Reviewed by: kib

show more ...


12345678910>>...208