Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
linux
Commits
ee251604
Commit
ee251604
authored
Jul 26, 2003
by
Stephen Lord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Scale default number of log buffers based on memory size
SGI Modid: 2.5.x-xfs:slinx:153273a
parent
74a6c1d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+11
-4
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_priv.h
+2
-1
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.c
+2
-2
No files found.
fs/xfs/xfs_log.c
View file @
ee251604
...
...
@@ -1066,7 +1066,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
if
(
mp
->
m_logbufs
==
0
)
{
xlog_debug
=
0
;
xlog_devt
=
log
->
l_dev
;
log
->
l_iclog_bufs
=
XLOG_
NUM
_ICLOGS
;
log
->
l_iclog_bufs
=
XLOG_
MIN
_ICLOGS
;
}
else
#endif
{
...
...
@@ -1074,9 +1074,16 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
* This is the normal path. If m_logbufs == -1, then the
* admin has chosen to use the system defaults for logbuffers.
*/
if
(
mp
->
m_logbufs
==
-
1
)
log
->
l_iclog_bufs
=
XLOG_NUM_ICLOGS
;
else
if
(
mp
->
m_logbufs
==
-
1
)
{
if
(
xfs_physmem
<=
btoc
(
128
*
1024
*
1024
))
{
log
->
l_iclog_bufs
=
XLOG_MIN_ICLOGS
;
}
else
if
(
xfs_physmem
<=
btoc
(
400
*
1024
*
1024
))
{
log
->
l_iclog_bufs
=
XLOG_MED_ICLOGS
;;
}
else
{
/* 256K with 32K bufs */
log
->
l_iclog_bufs
=
XLOG_MAX_ICLOGS
;
}
}
else
log
->
l_iclog_bufs
=
mp
->
m_logbufs
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
...
...
fs/xfs/xfs_log_priv.h
View file @
ee251604
...
...
@@ -50,7 +50,8 @@ struct xfs_mount;
* Macros, structures, prototypes for internal log manager use.
*/
#define XLOG_NUM_ICLOGS 2
#define XLOG_MIN_ICLOGS 2
#define XLOG_MED_ICLOGS 4
#define XLOG_MAX_ICLOGS 8
#define XLOG_CALLBACK_SIZE 10
#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe
/* Illegal cycle number */
...
...
fs/xfs/xfs_vfsops.c
View file @
ee251604
...
...
@@ -235,11 +235,11 @@ xfs_start_flags(
}
if
(
ap
->
logbufs
!=
0
&&
ap
->
logbufs
!=
-
1
&&
(
ap
->
logbufs
<
XLOG_
NUM
_ICLOGS
||
(
ap
->
logbufs
<
XLOG_
MIN
_ICLOGS
||
ap
->
logbufs
>
XLOG_MAX_ICLOGS
))
{
cmn_err
(
CE_WARN
,
"XFS: invalid logbufs value: %d [not %d-%d]"
,
ap
->
logbufs
,
XLOG_
NUM
_ICLOGS
,
XLOG_MAX_ICLOGS
);
ap
->
logbufs
,
XLOG_
MIN
_ICLOGS
,
XLOG_MAX_ICLOGS
);
return
XFS_ERROR
(
EINVAL
);
}
mp
->
m_logbufs
=
ap
->
logbufs
;
...
...
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