Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108675357
D32251.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
846 B
Referenced Files
None
Subscribers
None
D32251.diff
View Options
diff --git a/stand/common/bcache.c b/stand/common/bcache.c
--- a/stand/common/bcache.c
+++ b/stand/common/bcache.c
@@ -86,8 +86,9 @@
#define BHASH(bc, blkno) ((blkno) & ((bc)->bcache_nblks - 1))
#define BCACHE_LOOKUP(bc, blkno) \
((bc)->bcache_ctl[BHASH((bc), (blkno))].bc_blkno != (blkno))
-#define BCACHE_READAHEAD 256
+#define BCACHE_READAHEAD 512
#define BCACHE_MINREADAHEAD 32
+#define BCACHE_MAXIOWRA 512
static void bcache_invalidate(struct bcache *bc, daddr_t blkno);
static void bcache_insert(struct bcache *bc, daddr_t blkno);
@@ -324,6 +325,8 @@
if (ra != 0 && ra != bc->bcache_nblks) { /* do we have RA space? */
ra = MIN(bc->ra, ra - 1);
ra = rounddown(ra, 16); /* multiple of 16 blocks */
+ if (ra + p_size > BCACHE_MAXIOWRA)
+ ra = BCACHE_MAXIOWRA - p_size;
bc->ralen = ra;
p_size += ra;
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 28, 5:56 AM (3 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16253539
Default Alt Text
D32251.diff (846 B)
Attached To
Mode
D32251: loader bcache: Allow readahead up to a maximum I/O size of 256 kB
Attached
Detach File
Event Timeline
Log In to Comment