Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hardware-enablement
Rockchip upstream enablement efforts
linux
Commits
49a5192c
Commit
49a5192c
authored
1 year ago
by
Kent Overstreet
Browse files
Options
Downloads
Patches
Plain Diff
bcachefs: Add an option to control btree node prefetching
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8a0dda6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fs/bcachefs/btree_iter.c
+4
-2
4 additions, 2 deletions
fs/bcachefs/btree_iter.c
fs/bcachefs/opts.h
+7
-1
7 additions, 1 deletion
fs/bcachefs/opts.h
with
11 additions
and
3 deletions
fs/bcachefs/btree_iter.c
+
4
−
2
View file @
49a5192c
...
...
@@ -897,7 +897,8 @@ static noinline int btree_node_iter_and_journal_peek(struct btree_trans *trans,
bch2_bkey_buf_reassemble
(
out
,
c
,
k
);
if
(
flags
&
BTREE_ITER_PREFETCH
)
if
((
flags
&
BTREE_ITER_PREFETCH
)
&&
c
->
opts
.
btree_node_prefetch
)
ret
=
btree_path_prefetch_j
(
trans
,
path
,
&
jiter
);
bch2_btree_and_journal_iter_exit
(
&
jiter
);
...
...
@@ -929,7 +930,8 @@ static __always_inline int btree_path_down(struct btree_trans *trans,
bch2_bkey_buf_unpack
(
&
tmp
,
c
,
l
->
b
,
bch2_btree_node_iter_peek
(
&
l
->
iter
,
l
->
b
));
if
(
flags
&
BTREE_ITER_PREFETCH
)
{
if
((
flags
&
BTREE_ITER_PREFETCH
)
&&
c
->
opts
.
btree_node_prefetch
)
{
ret
=
btree_path_prefetch
(
trans
,
path
);
if
(
ret
)
goto
err
;
...
...
This diff is collapsed.
Click to expand it.
fs/bcachefs/opts.h
+
7
−
1
View file @
49a5192c
...
...
@@ -458,7 +458,13 @@ enum fsck_err_opts {
OPT_UINT(0, BCH_REPLICAS_MAX), \
BCH2_NO_SB_OPT, 1, \
"n", "Data written to this device will be considered\n"\
"to have already been replicated n times")
"to have already been replicated n times") \
x(btree_node_prefetch, u8, \
OPT_FS|OPT_MOUNT|OPT_RUNTIME, \
OPT_BOOL(), \
BCH2_NO_SB_OPT, true, \
NULL, "BTREE_ITER_PREFETCH casuse btree nodes to be\n"\
" prefetched sequentially")
struct
bch_opts
{
#define x(_name, _bits, ...) unsigned _name##_defined:1;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment