[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree
zrouter-src-freebsd at zrouter.org
zrouter-src-freebsd at zrouter.org
Wed Feb 1 10:56:37 UTC 2012
details: http://zrouter.org/hg/FreeBSD/head//rev/5c7520f2fce4
changeset: 310:5c7520f2fce4
user: ray at terran.dlink.ua
date: Wed Feb 01 11:32:30 2012 +0200
description:
Update sys/vm
diffstat:
head/sys/vm/uma.h | 6 +++++-
head/sys/vm/uma_core.c | 5 ++++-
head/sys/vm/vm_contig.c | 4 +++-
head/sys/vm/vm_kern.c | 4 +++-
head/sys/vm/vm_page.c | 7 ++++++-
head/sys/vm/vm_page.h | 4 +++-
head/sys/vm/vm_pageout.c | 9 +++------
7 files changed, 27 insertions(+), 12 deletions(-)
diffs (179 lines):
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/uma.h
--- a/head/sys/vm/uma.h Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/uma.h Wed Feb 01 11:32:30 2012 +0200
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: head/sys/vm/uma.h 226313 2011-10-12 18:08:28Z glebius $
+ * $FreeBSD: head/sys/vm/uma.h 230623 2012-01-27 20:18:31Z kmacy $
*
*/
@@ -248,6 +248,10 @@
* backend pages and can fail early.
*/
#define UMA_ZONE_VTOSLAB 0x2000 /* Zone uses vtoslab for lookup. */
+#define UMA_ZONE_NODUMP 0x4000 /*
+ * Zone's pages will not be included in
+ * mini-dumps.
+ */
/*
* These flags are shared between the keg and zone. In zones wishing to add
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/uma_core.c
--- a/head/sys/vm/uma_core.c Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/uma_core.c Wed Feb 01 11:32:30 2012 +0200
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/vm/uma_core.c 226313 2011-10-12 18:08:28Z glebius $");
+__FBSDID("$FreeBSD: head/sys/vm/uma_core.c 230623 2012-01-27 20:18:31Z kmacy $");
/* I should really use ktr.. */
/*
@@ -845,6 +845,9 @@
else
wait &= ~M_ZERO;
+ if (keg->uk_flags & UMA_ZONE_NODUMP)
+ wait |= M_NODUMP;
+
/* zone is passed for legacy reasons. */
mem = allocf(zone, keg->uk_ppera * UMA_SLAB_SIZE, &flags, wait);
if (mem == NULL) {
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/vm_contig.c
--- a/head/sys/vm/vm_contig.c Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/vm_contig.c Wed Feb 01 11:32:30 2012 +0200
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/vm/vm_contig.c 227568 2011-11-16 16:46:09Z alc $");
+__FBSDID("$FreeBSD: head/sys/vm/vm_contig.c 230623 2012-01-27 20:18:31Z kmacy $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -315,6 +315,8 @@
pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOBUSY;
if (flags & M_ZERO)
pflags |= VM_ALLOC_ZERO;
+ if (flags & M_NODUMP)
+ pflags |= VM_ALLOC_NODUMP;
VM_OBJECT_LOCK(object);
tries = 0;
retry:
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/vm_kern.c
--- a/head/sys/vm/vm_kern.c Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/vm_kern.c Wed Feb 01 11:32:30 2012 +0200
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/vm/vm_kern.c 226843 2011-10-27 16:39:17Z alc $");
+__FBSDID("$FreeBSD: head/sys/vm/vm_kern.c 230623 2012-01-27 20:18:31Z kmacy $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -382,6 +382,8 @@
if (flags & M_ZERO)
pflags |= VM_ALLOC_ZERO;
+ if (flags & M_NODUMP)
+ pflags |= VM_ALLOC_NODUMP;
VM_OBJECT_LOCK(kmem_object);
for (i = 0; i < size; i += PAGE_SIZE) {
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/vm_page.c
--- a/head/sys/vm/vm_page.c Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/vm_page.c Wed Feb 01 11:32:30 2012 +0200
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/vm/vm_page.c 228287 2011-12-05 18:29:25Z alc $");
+__FBSDID("$FreeBSD: head/sys/vm/vm_page.c 230623 2012-01-27 20:18:31Z kmacy $");
#include "opt_vm.h"
@@ -1305,6 +1305,7 @@
* VM_ALLOC_IFNOTCACHED return NULL, do not reactivate if the page
* is cached
* VM_ALLOC_NOBUSY do not set the flag VPO_BUSY on the page
+ * VM_ALLOC_NODUMP do not include the page in a kernel core dump
* VM_ALLOC_NOOBJ page is not associated with an object and
* should not have the flag VPO_BUSY set
* VM_ALLOC_WIRED wire the allocated page
@@ -1429,6 +1430,8 @@
* must be cleared before the free page queues lock is released.
*/
flags = 0;
+ if (req & VM_ALLOC_NODUMP)
+ flags |= PG_NODUMP;
if (m->flags & PG_ZERO) {
vm_page_zero_count--;
if (req & VM_ALLOC_ZERO)
@@ -1599,6 +1602,8 @@
flags = 0;
if ((req & VM_ALLOC_ZERO) != 0)
flags = PG_ZERO;
+ if ((req & VM_ALLOC_NODUMP) != 0)
+ flags |= PG_NODUMP;
if ((req & VM_ALLOC_WIRED) != 0)
atomic_add_int(&cnt.v_wire_count, npages);
oflags = VPO_UNMANAGED;
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/vm_page.h
--- a/head/sys/vm/vm_page.h Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/vm_page.h Wed Feb 01 11:32:30 2012 +0200
@@ -57,7 +57,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $FreeBSD: head/sys/vm/vm_page.h 228156 2011-11-30 17:39:00Z kib $
+ * $FreeBSD: head/sys/vm/vm_page.h 230623 2012-01-27 20:18:31Z kmacy $
*/
/*
@@ -263,6 +263,7 @@
#define PG_MARKER 0x10 /* special queue marker page */
#define PG_SLAB 0x20 /* object pointer is actually a slab */
#define PG_WINATCFLS 0x40 /* flush dirty page on inactive q */
+#define PG_NODUMP 0x80 /* don't include this page in the dump */
/*
* Misc constants.
@@ -350,6 +351,7 @@
#define VM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */
#define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */
#define VM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */
+#define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */
#define VM_ALLOC_COUNT_SHIFT 16
#define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT)
diff -r c769fd33bdf3 -r 5c7520f2fce4 head/sys/vm/vm_pageout.c
--- a/head/sys/vm/vm_pageout.c Wed Feb 01 11:32:14 2012 +0200
+++ b/head/sys/vm/vm_pageout.c Wed Feb 01 11:32:30 2012 +0200
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/vm/vm_pageout.c 225418 2011-09-06 10:30:11Z kib $");
+__FBSDID("$FreeBSD: head/sys/vm/vm_pageout.c 230247 2012-01-17 00:31:09Z nwhitehorn $");
#include "opt_vm.h"
#include <sys/param.h>
@@ -714,11 +714,8 @@
* table pages.
*/
if (desired == 0 && nothingwired) {
- tmpe = map->header.next;
- while (tmpe != &map->header) {
- pmap_remove(vm_map_pmap(map), tmpe->start, tmpe->end);
- tmpe = tmpe->next;
- }
+ pmap_remove(vm_map_pmap(map), vm_map_min(map),
+ vm_map_max(map));
}
vm_map_unlock(map);
}
More information about the Zrouter-src-freebsd
mailing list