svn commit: r248569 - in head/sys: kern vm
Konstantin Belousov
kib at FreeBSD.org
Thu Mar 21 07:28:16 UTC 2013
Author: kib
Date: Thu Mar 21 07:28:15 2013
New Revision: 248569
URL: http://svnweb.freebsd.org/changeset/base/248569
Log:
Only size and create the bio_transient_map when unmapped buffers are
enabled. Now, disabling the unmapped buffers should result in the
kernel memory map identical to pre-r248550.
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/vfs_bio.c
head/sys/vm/vm_init.c
Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c Thu Mar 21 07:26:33 2013 (r248568)
+++ head/sys/kern/vfs_bio.c Thu Mar 21 07:28:15 2013 (r248569)
@@ -586,7 +586,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon
* allows to not trim the buffer KVA for the architectures
* with ample KVA space.
*/
- if (bio_transient_maxcnt == 0) {
+ if (bio_transient_maxcnt == 0 && unmapped_buf_allowed) {
maxbuf_sz = maxbcache != 0 ? maxbcache : maxbuf * BKVASIZE;
buf_sz = (long)nbuf * BKVASIZE;
if (buf_sz < maxbuf_sz / 10 * 9) {
Modified: head/sys/vm/vm_init.c
==============================================================================
--- head/sys/vm/vm_init.c Thu Mar 21 07:26:33 2013 (r248568)
+++ head/sys/vm/vm_init.c Thu Mar 21 07:28:15 2013 (r248569)
@@ -189,10 +189,12 @@ again:
buffer_map = kmem_suballoc(clean_map, &kmi->buffer_sva,
&kmi->buffer_eva, (long)nbuf * BKVASIZE, FALSE);
buffer_map->system_map = 1;
- bio_transient_map = kmem_suballoc(clean_map, &kmi->bio_transient_sva,
- &kmi->bio_transient_eva, (long)bio_transient_maxcnt * MAXPHYS,
- FALSE);
- bio_transient_map->system_map = 1;
+ if (bio_transient_maxcnt != 0) {
+ bio_transient_map = kmem_suballoc(clean_map,
+ &kmi->bio_transient_sva, &kmi->bio_transient_eva,
+ (long)bio_transient_maxcnt * MAXPHYS, FALSE);
+ bio_transient_map->system_map = 1;
+ }
pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
(long)nswbuf * MAXPHYS, FALSE);
pager_map->system_map = 1;
More information about the svn-src-all
mailing list