Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-seco-imx
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
Clea OS
bsp
nxp
linux-seco-imx
Commits
7457e6e2
Commit
7457e6e2
authored
18 years ago
by
Jens Axboe
Committed by
Jens Axboe
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[PATCH] blktrace: support for logging metadata reads
Signed-off-by:
Jens Axboe
<
axboe@suse.de
>
parent
374f84ac
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
block/blktrace.c
+4
-1
4 additions, 1 deletion
block/blktrace.c
include/linux/blktrace_api.h
+1
-0
1 addition, 0 deletions
include/linux/blktrace_api.h
with
5 additions
and
1 deletion
block/blktrace.c
+
4
−
1
View file @
7457e6e2
...
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK
...
@@ -69,7 +69,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK
/*
/*
* Bio action bits of interest
* Bio action bits of interest
*/
*/
static
u32
bio_act
[
5
]
__read_mostly
=
{
0
,
BLK_TC_ACT
(
BLK_TC_BARRIER
),
BLK_TC_ACT
(
BLK_TC_SYNC
),
0
,
BLK_TC_ACT
(
BLK_TC_AHEAD
)
};
static
u32
bio_act
[
9
]
__read_mostly
=
{
0
,
BLK_TC_ACT
(
BLK_TC_BARRIER
),
BLK_TC_ACT
(
BLK_TC_SYNC
),
0
,
BLK_TC_ACT
(
BLK_TC_AHEAD
)
,
0
,
0
,
0
,
BLK_TC_ACT
(
BLK_TC_META
)
};
/*
/*
* More could be added as needed, taking care to increment the decrementer
* More could be added as needed, taking care to increment the decrementer
...
@@ -81,6 +81,8 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC
...
@@ -81,6 +81,8 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC
(((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
(((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
#define trace_ahead_bit(rw) \
#define trace_ahead_bit(rw) \
(((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD))
(((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD))
#define trace_meta_bit(rw) \
(((rw) & (1 << BIO_RW_META)) >> (BIO_RW_META - 3))
/*
/*
* The worker for the various blk_add_trace*() types. Fills out a
* The worker for the various blk_add_trace*() types. Fills out a
...
@@ -103,6 +105,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
...
@@ -103,6 +105,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
what
|=
bio_act
[
trace_barrier_bit
(
rw
)];
what
|=
bio_act
[
trace_barrier_bit
(
rw
)];
what
|=
bio_act
[
trace_sync_bit
(
rw
)];
what
|=
bio_act
[
trace_sync_bit
(
rw
)];
what
|=
bio_act
[
trace_ahead_bit
(
rw
)];
what
|=
bio_act
[
trace_ahead_bit
(
rw
)];
what
|=
bio_act
[
trace_meta_bit
(
rw
)];
pid
=
tsk
->
pid
;
pid
=
tsk
->
pid
;
if
(
unlikely
(
act_log_check
(
bt
,
what
,
sector
,
pid
)))
if
(
unlikely
(
act_log_check
(
bt
,
what
,
sector
,
pid
)))
...
...
This diff is collapsed.
Click to expand it.
include/linux/blktrace_api.h
+
1
−
0
View file @
7457e6e2
...
@@ -20,6 +20,7 @@ enum blktrace_cat {
...
@@ -20,6 +20,7 @@ enum blktrace_cat {
BLK_TC_PC
=
1
<<
9
,
/* pc requests */
BLK_TC_PC
=
1
<<
9
,
/* pc requests */
BLK_TC_NOTIFY
=
1
<<
10
,
/* special message */
BLK_TC_NOTIFY
=
1
<<
10
,
/* special message */
BLK_TC_AHEAD
=
1
<<
11
,
/* readahead */
BLK_TC_AHEAD
=
1
<<
11
,
/* readahead */
BLK_TC_META
=
1
<<
12
,
/* metadata */
BLK_TC_END
=
1
<<
15
,
/* only 16-bits, reminder */
BLK_TC_END
=
1
<<
15
,
/* only 16-bits, reminder */
};
};
...
...
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