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:
parent
6c83fce371
commit
7db07e1c85
@ -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
|
* allows to not trim the buffer KVA for the architectures
|
||||||
* with ample KVA space.
|
* with ample KVA space.
|
||||||
*/
|
*/
|
||||||
if (bio_transient_maxcnt == 0) {
|
if (bio_transient_maxcnt == 0 && unmapped_buf_allowed) {
|
||||||
maxbuf_sz = maxbcache != 0 ? maxbcache : maxbuf * BKVASIZE;
|
maxbuf_sz = maxbcache != 0 ? maxbcache : maxbuf * BKVASIZE;
|
||||||
buf_sz = (long)nbuf * BKVASIZE;
|
buf_sz = (long)nbuf * BKVASIZE;
|
||||||
if (buf_sz < maxbuf_sz / 10 * 9) {
|
if (buf_sz < maxbuf_sz / 10 * 9) {
|
||||||
|
@ -189,10 +189,12 @@ vm_ksubmap_init(struct kva_md_info *kmi)
|
|||||||
buffer_map = kmem_suballoc(clean_map, &kmi->buffer_sva,
|
buffer_map = kmem_suballoc(clean_map, &kmi->buffer_sva,
|
||||||
&kmi->buffer_eva, (long)nbuf * BKVASIZE, FALSE);
|
&kmi->buffer_eva, (long)nbuf * BKVASIZE, FALSE);
|
||||||
buffer_map->system_map = 1;
|
buffer_map->system_map = 1;
|
||||||
bio_transient_map = kmem_suballoc(clean_map, &kmi->bio_transient_sva,
|
if (bio_transient_maxcnt != 0) {
|
||||||
&kmi->bio_transient_eva, (long)bio_transient_maxcnt * MAXPHYS,
|
bio_transient_map = kmem_suballoc(clean_map,
|
||||||
FALSE);
|
&kmi->bio_transient_sva, &kmi->bio_transient_eva,
|
||||||
|
(long)bio_transient_maxcnt * MAXPHYS, FALSE);
|
||||||
bio_transient_map->system_map = 1;
|
bio_transient_map->system_map = 1;
|
||||||
|
}
|
||||||
pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
|
pager_map = kmem_suballoc(clean_map, &kmi->pager_sva, &kmi->pager_eva,
|
||||||
(long)nswbuf * MAXPHYS, FALSE);
|
(long)nswbuf * MAXPHYS, FALSE);
|
||||||
pager_map->system_map = 1;
|
pager_map->system_map = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user