From 2c610cf7b5437ca82bdbf9f4b393358b6fb74c45 Mon Sep 17 00:00:00 2001 From: dougm Date: Sat, 6 Jul 2019 15:55:16 +0000 Subject: [PATCH] Fix style(9) violations involving division by PAGE_SIZE. Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20847 --- sys/vm/swap_pager.c | 4 ++-- sys/vm/vm_pageout.c | 2 +- sys/vm/vnode_pager.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 2cfb6425553e..0604510857d7 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -523,7 +523,7 @@ swap_pager_swap_init(void) * but it isn't very efficient). * * The nsw_cluster_max is constrained by the bp->b_pages[] - * array (MAXPHYS/PAGE_SIZE) and our locally defined + * array MAXPHYS / PAGE_SIZE and our locally defined * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are * constrained by the swap device interleave stripe size. * @@ -538,7 +538,7 @@ swap_pager_swap_init(void) * have one NFS swap device due to the command/ack latency over NFS. * So it all works out pretty well. */ - nsw_cluster_max = min((MAXPHYS/PAGE_SIZE), MAX_PAGEOUT_CLUSTER); + nsw_cluster_max = min(MAXPHYS / PAGE_SIZE, MAX_PAGEOUT_CLUSTER); nsw_wcount_async = 4; nsw_wcount_async_max = nsw_wcount_async; diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 733678e4cbcb..1d9d6bd2defd 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1972,7 +1972,7 @@ vm_pageout_init_domain(int domain) vmd->vmd_free_min = 4 + (vmd->vmd_page_count - 1024) / 200; else vmd->vmd_free_min = 4; - vmd->vmd_pageout_free_min = (2*MAXBSIZE)/PAGE_SIZE + + vmd->vmd_pageout_free_min = 2 * MAXBSIZE / PAGE_SIZE + vmd->vmd_interrupt_free_min; vmd->vmd_free_reserved = vm_pageout_page_count + vmd->vmd_pageout_free_min + (vmd->vmd_page_count / 768); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index fb7c4237711e..e9a78f7b33ee 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -544,8 +544,8 @@ vnode_pager_addr(struct vnode *vp, vm_ooffset_t address, daddr_t *rtaddress, *rtaddress += voffset / DEV_BSIZE; if (run) { *run += 1; - *run *= bsize/PAGE_SIZE; - *run -= voffset/PAGE_SIZE; + *run *= bsize / PAGE_SIZE; + *run -= voffset / PAGE_SIZE; } }