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
77fe0a19
Commit
77fe0a19
authored
Apr 11, 2004
by
Andrew Morton
Committed by
Linus Torvalds
Apr 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kswapd: remove pages_scanned local
This is always equal to constant zero.
parent
2d47875a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
mm/vmscan.c
mm/vmscan.c
+6
-6
No files found.
mm/vmscan.c
View file @
77fe0a19
...
...
@@ -907,6 +907,7 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
int
priority
;
int
i
;
struct
reclaim_state
*
reclaim_state
=
current
->
reclaim_state
;
unsigned
long
total_scanned
=
0
;
inc_page_state
(
pageoutrun
);
...
...
@@ -918,7 +919,6 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
for
(
priority
=
DEF_PRIORITY
;
priority
;
priority
--
)
{
int
all_zones_ok
=
1
;
int
pages_scanned
=
0
;
int
end_zone
=
0
;
/* Inclusive. 0 = ZONE_DMA */
...
...
@@ -955,9 +955,9 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
*/
for
(
i
=
0
;
i
<=
end_zone
;
i
++
)
{
struct
zone
*
zone
=
pgdat
->
node_zones
+
i
;
int
total_scanned
=
0
;
int
max_scan
;
int
reclaimed
;
int
scanned
=
0
;
if
(
zone
->
all_unreclaimable
&&
priority
!=
DEF_PRIORITY
)
continue
;
...
...
@@ -969,10 +969,10 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
zone
->
temp_priority
=
priority
;
max_scan
=
zone
->
nr_inactive
>>
priority
;
reclaimed
=
shrink_zone
(
zone
,
max_scan
,
GFP_KERNEL
,
&
total_
scanned
,
ps
);
total_scanned
+=
pages_
scanned
;
&
scanned
,
ps
);
total_scanned
+=
scanned
;
reclaim_state
->
reclaimed_slab
=
0
;
shrink_slab
(
total_
scanned
,
GFP_KERNEL
);
shrink_slab
(
scanned
,
GFP_KERNEL
);
reclaimed
+=
reclaim_state
->
reclaimed_slab
;
to_free
-=
reclaimed
;
if
(
zone
->
all_unreclaimable
)
...
...
@@ -988,7 +988,7 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages, struct page_state *ps)
* OK, kswapd is getting into trouble. Take a nap, then take
* another pass across the zones.
*/
if
(
pages
_scanned
&&
priority
<
DEF_PRIORITY
-
2
)
if
(
total
_scanned
&&
priority
<
DEF_PRIORITY
-
2
)
blk_congestion_wait
(
WRITE
,
HZ
/
10
);
}
out:
...
...
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