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
c78a6f26
Commit
c78a6f26
authored
May 14, 2004
by
Andrew Morton
Committed by
Linus Torvalds
May 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] rename rmap_lock to page_map_lock
Sync this up with Andrea's patches.
parent
70d1f017
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
include/linux/rmap.h
include/linux/rmap.h
+2
-2
mm/rmap.c
mm/rmap.c
+4
-4
mm/vmscan.c
mm/vmscan.c
+10
-10
No files found.
include/linux/rmap.h
View file @
c78a6f26
...
...
@@ -8,9 +8,9 @@
#include <linux/config.h>
#include <linux/linkage.h>
#define
r
map_lock(page) \
#define
page_
map_lock(page) \
bit_spin_lock(PG_maplock, (unsigned long *)&(page)->flags)
#define
r
map_unlock(page) \
#define
page_
map_unlock(page) \
bit_spin_unlock(PG_maplock, (unsigned long *)&(page)->flags)
#ifdef CONFIG_MMU
...
...
mm/rmap.c
View file @
c78a6f26
...
...
@@ -186,7 +186,7 @@ page_add_rmap(struct page *page, pte_t *ptep, struct pte_chain *pte_chain)
if
(
PageReserved
(
page
))
return
pte_chain
;
r
map_lock
(
page
);
page_
map_lock
(
page
);
if
(
page
->
pte
.
direct
==
0
)
{
page
->
pte
.
direct
=
pte_paddr
;
...
...
@@ -223,7 +223,7 @@ page_add_rmap(struct page *page, pte_t *ptep, struct pte_chain *pte_chain)
cur_pte_chain
->
ptes
[
pte_chain_idx
(
cur_pte_chain
)
-
1
]
=
pte_paddr
;
cur_pte_chain
->
next_and_idx
--
;
out:
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
return
pte_chain
;
}
...
...
@@ -245,7 +245,7 @@ void fastcall page_remove_rmap(struct page *page, pte_t *ptep)
if
(
!
pfn_valid
(
page_to_pfn
(
page
))
||
PageReserved
(
page
))
return
;
r
map_lock
(
page
);
page_
map_lock
(
page
);
if
(
!
page_mapped
(
page
))
goto
out_unlock
;
/* remap_page_range() from a driver? */
...
...
@@ -294,7 +294,7 @@ void fastcall page_remove_rmap(struct page *page, pte_t *ptep)
dec_page_state
(
nr_mapped
);
}
out_unlock:
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
}
/**
...
...
mm/vmscan.c
View file @
c78a6f26
...
...
@@ -276,11 +276,11 @@ shrink_list(struct list_head *page_list, unsigned int gfp_mask,
if
(
PageWriteback
(
page
))
goto
keep_locked
;
r
map_lock
(
page
);
page_
map_lock
(
page
);
referenced
=
page_referenced
(
page
);
if
(
referenced
&&
page_mapping_inuse
(
page
))
{
/* In active use or really unfreeable. Activate it. */
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
goto
activate_locked
;
}
...
...
@@ -295,10 +295,10 @@ shrink_list(struct list_head *page_list, unsigned int gfp_mask,
* XXX: implement swap clustering ?
*/
if
(
PageAnon
(
page
)
&&
!
PageSwapCache
(
page
))
{
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
if
(
!
add_to_swap
(
page
))
goto
activate_locked
;
r
map_lock
(
page
);
page_
map_lock
(
page
);
}
if
(
PageSwapCache
(
page
))
{
mapping
=
&
swapper_space
;
...
...
@@ -313,16 +313,16 @@ shrink_list(struct list_head *page_list, unsigned int gfp_mask,
if
(
page_mapped
(
page
)
&&
mapping
)
{
switch
(
try_to_unmap
(
page
))
{
case
SWAP_FAIL
:
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
goto
activate_locked
;
case
SWAP_AGAIN
:
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
goto
keep_locked
;
case
SWAP_SUCCESS
:
;
/* try to free the page below */
}
}
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
/*
* If the page is dirty, only perform writeback if that write
...
...
@@ -663,13 +663,13 @@ refill_inactive_zone(struct zone *zone, const int nr_pages_in,
list_add
(
&
page
->
lru
,
&
l_active
);
continue
;
}
r
map_lock
(
page
);
page_
map_lock
(
page
);
if
(
page_referenced
(
page
))
{
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
list_add
(
&
page
->
lru
,
&
l_active
);
continue
;
}
r
map_unlock
(
page
);
page_
map_unlock
(
page
);
}
/*
* FIXME: need to consider page_count(page) here if/when we
...
...
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