Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
MariaDB
Commits
9580b5f2
Commit
9580b5f2
authored
18 years ago
by
marko
Browse files
Options
Download
Email Patches
Plain Diff
branches/zip: buf_read_ahead_random(): Stop searching upon exceeding the
threshold.
parent
8332c45c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
buf/buf0rea.c
buf/buf0rea.c
+11
-8
No files found.
buf/buf0rea.c
View file @
9580b5f2
...
...
@@ -236,21 +236,24 @@ buf_read_ahead_random(
block
=
buf_page_hash_get
(
space
,
i
);
if
((
block
)
&&
(
block
->
LRU_position
>
LRU_recent_limit
)
&&
block
->
accessed
)
{
&&
block
->
accessed
&&
(
block
->
LRU_position
>
LRU_recent_limit
)
)
{
recent_blocks
++
;
if
(
recent_blocks
>=
BUF_READ_AHEAD_RANDOM_THRESHOLD
)
{
mutex_exit
(
&
buf_pool
->
mutex
);
goto
read_ahead
;
}
}
}
mutex_exit
(
&
(
buf_pool
->
mutex
));
/* Do nothing */
return
(
0
);
if
(
recent_blocks
<
BUF_READ_AHEAD_RANDOM_THRESHOLD
)
{
/* Do nothing */
return
(
0
);
}
read_ahead:
/* Read all the suitable blocks within the area */
if
(
ibuf_inside
())
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment