projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cbea1d
)
mm: filter unevictable page out in deactivate_page()
author
Minchan Kim
<
[email protected]
>
Wed, 25 May 2011 00:12:31 +0000
(17:12 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 25 May 2011 15:39:27 +0000
(08:39 -0700)
It's pointless that deactive_page's operates on unevictable pages. This
patch removes unnecessary overhead which might be a bit problem in case
that there are many unevictable page in system(ex, mprotect workload)
[
[email protected]
: tidy up comment]
Reviewed-by: KOSAKI Motohiro <
[email protected]
>
Signed-off-by: Minchan Kim <
[email protected]
>
Reviewed-by: Rik van Riel<
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/swap.c
patch
|
blob
|
history
diff --git
a/mm/swap.c
b/mm/swap.c
index 5602f1a1b1e724ba547bdee3ef21d773fd24ee04..2f365d1a4bb2c33be69036121c325f2c4f103604 100644
(file)
--- a/
mm/swap.c
+++ b/
mm/swap.c
@@
-476,6
+476,13
@@
static void drain_cpu_pagevecs(int cpu)
*/
void deactivate_page(struct page *page)
{
+ /*
+ * In a workload with many unevictable page such as mprotect, unevictable
+ * page deactivation for accelerating reclaim is pointless.
+ */
+ if (PageUnevictable(page))
+ return;
+
if (likely(get_page_unless_zero(page))) {
struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs);