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
This commit is contained in:
Konstantin Belousov 2013-03-21 07:28:15 +00:00
parent 6c83fce371
commit 7db07e1c85
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248569
2 changed files with 7 additions and 5 deletions

View File

@ -586,7 +586,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est)
* 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) {

View File

@ -189,10 +189,12 @@ vm_ksubmap_init(struct kva_md_info *kmi)
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;