Date: Sun, 10 Aug 2014 16:59:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269782 - in head/sys/sparc64: include sparc64 Message-ID: <53e7a4fc.2898.352aa941@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Aug 10 16:59:39 2014 New Revision: 269782 URL: http://svnweb.freebsd.org/changeset/base/269782 Log: On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 pmap, unlike i386, and similar to i386/xen pv, does not tolerate abandoned mappings for the freed pages. Reported and tested by: dumbbell Diagnosed and reviewed by: alc Sponsored by: The FreeBSD Foundation Added: head/sys/sparc64/include/sf_buf.h - copied, changed from r269781, head/sys/i386/include/sf_buf.h Modified: head/sys/sparc64/include/vmparam.h head/sys/sparc64/sparc64/vm_machdep.c Copied and modified: head/sys/sparc64/include/sf_buf.h (from r269781, head/sys/i386/include/sf_buf.h) ============================================================================== --- head/sys/i386/include/sf_buf.h Sun Aug 10 15:21:26 2014 (r269781, copy source) +++ head/sys/sparc64/include/sf_buf.h Sun Aug 10 16:59:39 2014 (r269782) @@ -31,6 +31,5 @@ void sf_buf_map(struct sf_buf *, int); int sf_buf_unmap(struct sf_buf *); -boolean_t sf_buf_invalidate_cache(vm_page_t); #endif /* !_MACHINE_SF_BUF_H_ */ Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/include/vmparam.h Sun Aug 10 16:59:39 2014 (r269782) @@ -240,6 +240,6 @@ extern vm_offset_t vm_max_kernel_address #define ZERO_REGION_SIZE PAGE_SIZE #define SFBUF -#define SFBUF_NOMD +#define SFBUF_MAP #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 16:59:39 2014 (r269782) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/sysent.h> #include <sys/sched.h> +#include <sys/sf_buf.h> #include <sys/sysctl.h> #include <sys/unistd.h> #include <sys/vmmeter.h> @@ -443,3 +444,18 @@ uma_small_free(void *mem, int size, u_in vm_page_free(m); atomic_subtract_int(&vm_cnt.v_wire_count, 1); } + +void +sf_buf_map(struct sf_buf *sf, int flags) +{ + + pmap_qenter(sf->kva, &sf->m, 1); +} + +int +sf_buf_unmap(struct sf_buf *sf) +{ + + pmap_qremove(sf->kva, 1); + return (1); +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e7a4fc.2898.352aa941>