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
nexedi
linux
Commits
4bf690c2
Commit
4bf690c2
authored
Sep 29, 2003
by
Eric Sandeen
Committed by
Stephen Lord
Sep 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Re-work pagebuf stats macros to help support per-cpu data
SGI Modid: 2.5.x-xfs:slinx:158653a
parent
00d4d5a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
fs/xfs/pagebuf/page_buf.c
fs/xfs/pagebuf/page_buf.c
+9
-9
fs/xfs/pagebuf/page_buf_internal.h
fs/xfs/pagebuf/page_buf_internal.h
+3
-2
No files found.
fs/xfs/pagebuf/page_buf.c
View file @
4bf690c2
...
...
@@ -293,7 +293,7 @@ _pagebuf_initialize(
atomic_set
(
&
pb
->
pb_pin_count
,
0
);
init_waitqueue_head
(
&
pb
->
pb_waiters
);
PB_STATS_INC
(
pb
stats
.
pb
_create
);
PB_STATS_INC
(
pb_create
);
PB_TRACE
(
pb
,
PB_TRACE_REC
(
get
),
target
);
}
...
...
@@ -485,7 +485,7 @@ _pagebuf_lookup_pages(
page
=
find_or_create_page
(
aspace
,
index
,
gfp_mask
);
if
(
!
page
)
{
if
(
--
retry_count
>
0
)
{
PB_STATS_INC
(
pb
stats
.
pb
_page_retries
);
PB_STATS_INC
(
pb_page_retries
);
pagebuf_daemon_wakeup
(
1
);
current
->
state
=
TASK_UNINTERRUPTIBLE
;
schedule_timeout
(
10
);
...
...
@@ -495,7 +495,7 @@ _pagebuf_lookup_pages(
all_mapped
=
0
;
continue
;
}
PB_STATS_INC
(
pb
stats
.
pb
_page_found
);
PB_STATS_INC
(
pb_page_found
);
mark_page_accessed
(
page
);
pb
->
pb_pages
[
pi
]
=
page
;
}
else
{
...
...
@@ -645,7 +645,7 @@ _pagebuf_find( /* find buffer for block */
h
->
pb_count
++
;
list_add
(
&
new_pb
->
pb_hash_list
,
&
h
->
pb_hash
);
}
else
{
PB_STATS_INC
(
pb
stats
.
pb
_miss_locked
);
PB_STATS_INC
(
pb_miss_locked
);
}
spin_unlock
(
&
h
->
pb_hash_lock
);
...
...
@@ -665,7 +665,7 @@ _pagebuf_find( /* find buffer for block */
/* wait for buffer ownership */
PB_TRACE
(
pb
,
PB_TRACE_REC
(
get_lk
),
0
);
pagebuf_lock
(
pb
);
PB_STATS_INC
(
pb
stats
.
pb
_get_locked_waited
);
PB_STATS_INC
(
pb_get_locked_waited
);
}
else
{
/* We asked for a trylock and failed, no need
* to look at file offset and length here, we
...
...
@@ -675,7 +675,7 @@ _pagebuf_find( /* find buffer for block */
*/
pagebuf_rele
(
pb
);
PB_STATS_INC
(
pb
stats
.
pb
_busy_locked
);
PB_STATS_INC
(
pb_busy_locked
);
return
(
NULL
);
}
}
else
{
...
...
@@ -691,7 +691,7 @@ _pagebuf_find( /* find buffer for block */
_PBF_ADDR_ALLOCATED
|
\
_PBF_MEM_ALLOCATED
;
PB_TRACE
(
pb
,
PB_TRACE_REC
(
got_lk
),
0
);
PB_STATS_INC
(
pb
stats
.
pb
_get_locked
);
PB_STATS_INC
(
pb_get_locked
);
return
(
pb
);
}
...
...
@@ -747,7 +747,7 @@ pagebuf_get( /* allocate a buffer */
return
(
NULL
);
}
PB_STATS_INC
(
pb
stats
.
pb
_get
);
PB_STATS_INC
(
pb_get
);
/* fill in any missing pages */
error
=
_pagebuf_lookup_pages
(
pb
,
pb
->
pb_target
->
pbr_mapping
,
flags
);
...
...
@@ -766,7 +766,7 @@ pagebuf_get( /* allocate a buffer */
if
(
flags
&
PBF_READ
)
{
if
(
PBF_NOT_DONE
(
pb
))
{
PB_TRACE
(
pb
,
PB_TRACE_REC
(
get_read
),
flags
);
PB_STATS_INC
(
pb
stats
.
pb
_get_read
);
PB_STATS_INC
(
pb_get_read
);
pagebuf_iostart
(
pb
,
flags
);
}
else
if
(
flags
&
PBF_ASYNC
)
{
/*
...
...
fs/xfs/pagebuf/page_buf_internal.h
View file @
4bf690c2
...
...
@@ -37,6 +37,7 @@
#ifndef __PAGE_BUF_PRIVATE_H__
#define __PAGE_BUF_PRIVATE_H__
#include <linux/percpu.h>
#include "page_buf.h"
#define _PAGE_BUF_INTERNAL_
...
...
@@ -120,9 +121,9 @@ struct pbstats {
u_int32_t
pb_get_read
;
};
extern
struct
pbstats
pbstats
;
DECLARE_PER_CPU
(
struct
pbstats
,
pbstats
)
;
#define PB_STATS_INC(count)
( count
++ )
#define PB_STATS_INC(count)
( get_cpu_var(pbstats).count
++ )
#ifndef STATIC
# define STATIC static
...
...
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