Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332476
b: refs/heads/master
c: 8449d21
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Oct 9, 2012
1 parent 04e6a6f commit d757668
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b676b293fb48672904ee1b9828cb50b4eed01717
refs/heads/master: 8449d21fb49e9824e2736c5febd6b5d287cd2ba1
3 changes: 2 additions & 1 deletion trunk/mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ static inline int mlocked_vma_newpage(struct vm_area_struct *vma,
return 0;

if (!TestSetPageMlocked(page)) {
inc_zone_page_state(page, NR_MLOCK);
mod_zone_page_state(page_zone(page), NR_MLOCK,
hpage_nr_pages(page));
count_vm_event(UNEVICTABLE_PGMLOCKED);
}
return 1;
Expand Down
9 changes: 6 additions & 3 deletions trunk/mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ void clear_page_mlock(struct page *page)
if (!TestClearPageMlocked(page))
return;

dec_zone_page_state(page, NR_MLOCK);
mod_zone_page_state(page_zone(page), NR_MLOCK,
-hpage_nr_pages(page));
count_vm_event(UNEVICTABLE_PGCLEARED);
if (!isolate_lru_page(page)) {
putback_lru_page(page);
Expand All @@ -78,7 +79,8 @@ void mlock_vma_page(struct page *page)
BUG_ON(!PageLocked(page));

if (!TestSetPageMlocked(page)) {
inc_zone_page_state(page, NR_MLOCK);
mod_zone_page_state(page_zone(page), NR_MLOCK,
hpage_nr_pages(page));
count_vm_event(UNEVICTABLE_PGMLOCKED);
if (!isolate_lru_page(page))
putback_lru_page(page);
Expand All @@ -105,7 +107,8 @@ void munlock_vma_page(struct page *page)
BUG_ON(!PageLocked(page));

if (TestClearPageMlocked(page)) {
dec_zone_page_state(page, NR_MLOCK);
mod_zone_page_state(page_zone(page), NR_MLOCK,
-hpage_nr_pages(page));
if (!isolate_lru_page(page)) {
int ret = SWAP_AGAIN;

Expand Down

0 comments on commit d757668

Please sign in to comment.