Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7b47e8ca
Commit
7b47e8ca
authored
Mar 05, 2008
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_flush_try_neighbors(): Compute buf_flush_area only
once and assign it to an auxiliary variable.
parent
c4605a28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
buf/buf0flu.c
buf/buf0flu.c
+9
-9
No files found.
buf/buf0flu.c
View file @
7b47e8ca
...
...
@@ -27,12 +27,6 @@ Created 11/11/1995 Heikki Tuuri
#include "trx0sys.h"
#include "srv0srv.h"
/* When flushed, dirty blocks are searched in neighborhoods of this size, and
flushed along with the original page. */
#define BUF_FLUSH_AREA ut_min(BUF_READ_AHEAD_AREA,\
buf_pool->curr_size / 16)
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**********************************************************************
Validates the flush list. */
...
...
@@ -915,15 +909,21 @@ buf_flush_try_neighbors(
ut_ad
(
flush_type
==
BUF_FLUSH_LRU
||
flush_type
==
BUF_FLUSH_LIST
);
low
=
(
offset
/
BUF_FLUSH_AREA
)
*
BUF_FLUSH_AREA
;
high
=
(
offset
/
BUF_FLUSH_AREA
+
1
)
*
BUF_FLUSH_AREA
;
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
<
BUF_LRU_OLD_MIN_LEN
)
{
/* If there is little space, it is better not to flush any
block except from the end of the LRU list */
low
=
offset
;
high
=
offset
+
1
;
}
else
{
/* When flushed, dirty blocks are searched in neighborhoods of
this size, and flushed along with the original page. */
ulint
buf_flush_area
=
ut_min
(
BUF_READ_AHEAD_AREA
,
buf_pool
->
curr_size
/
16
);
low
=
(
offset
/
buf_flush_area
)
*
buf_flush_area
;
high
=
(
offset
/
buf_flush_area
+
1
)
*
buf_flush_area
;
}
/* fprintf(stderr, "Flush area: low %lu high %lu\n", low, high); */
...
...
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