Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148998968
D11028.id29177.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11028.id29177.diff
View Options
Index: kern/subr_blist.c
===================================================================
--- kern/subr_blist.c
+++ kern/subr_blist.c
@@ -366,7 +366,7 @@
j >>= 1;
mask >>= j;
}
- scan->u.bmu_bitmap &= ~(1 << r);
+ scan->u.bmu_bitmap &= ~((u_daddr_t)1 << r);
return(blk + r);
}
if (count <= BLIST_BMAP_RADIX) {
@@ -658,7 +658,7 @@
int i;
for (i = 0; i < BLIST_BMAP_RADIX && i < count; ++i) {
- if (v & (1 << i))
+ if (v & ((u_daddr_t)1 << i))
blist_free(dest, blk + i, 1);
}
}
Index: sys/blist.h
===================================================================
--- sys/blist.h
+++ sys/blist.h
@@ -44,7 +44,7 @@
* ops.
*
* SWAPBLK_NONE is returned on failure. This module is typically
- * capable of managing up to (2^31) blocks per blist, though
+ * capable of managing up to (2^63) blocks per blist, though
* the memory utilization would be insane if you actually did
* that. Managing something like 512MB worth of 4K blocks
* eats around 32 KBytes of memory.
@@ -56,7 +56,7 @@
#ifndef _SYS_BLIST_H_
#define _SYS_BLIST_H_
-typedef u_int32_t u_daddr_t; /* unsigned disk address */
+typedef uint64_t u_daddr_t; /* unsigned disk address */
/*
* note: currently use SWAPBLK_NONE as an absolute value rather then
Index: vm/swap_pager.c
===================================================================
--- vm/swap_pager.c
+++ vm/swap_pager.c
@@ -116,9 +116,8 @@
#include <geom/geom.h>
/*
- * SWB_NPAGES must be a power of 2. It may be set to 1, 2, 4, 8, 16
- * or 32 pages per allocation.
- * The 32-page limit is due to the radix code (kern/subr_blist.c).
+ * MAX_PAGEOUT_CLUSTER must be a power of 2 between 1 and 64.
+ * The 64-page limit is due to the radix code (kern/subr_blist.c).
*/
#ifndef MAX_PAGEOUT_CLUSTER
#define MAX_PAGEOUT_CLUSTER 16
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 4:10 PM (12 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30127599
Default Alt Text
D11028.id29177.diff (1 KB)
Attached To
Mode
D11028: Halve the memory allocated by the blist allocator that is used for managing swap space
Attached
Detach File
Event Timeline
Log In to Comment