projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3.10.106' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
mm
/
swap.c
diff --git
a/mm/swap.c
b/mm/swap.c
index ea58dbde788ed6fdee09243be247841f57a68da9..de77948c97195fa4995cc612f5d6f42b23250165 100644
(file)
--- a/
mm/swap.c
+++ b/
mm/swap.c
@@
-81,7
+81,7
@@
static void put_compound_page(struct page *page)
{
if (unlikely(PageTail(page))) {
/* __split_huge_page_refcount can run under us */
{
if (unlikely(PageTail(page))) {
/* __split_huge_page_refcount can run under us */
- struct page *page_head = compound_
trans_
head(page);
+ struct page *page_head = compound_head(page);
if (likely(page != page_head &&
get_page_unless_zero(page_head))) {
if (likely(page != page_head &&
get_page_unless_zero(page_head))) {
@@
-219,7
+219,7
@@
bool __get_page_tail(struct page *page)
*/
unsigned long flags;
bool got = false;
*/
unsigned long flags;
bool got = false;
- struct page *page_head = compound_
trans_
head(page);
+ struct page *page_head = compound_head(page);
if (likely(page != page_head && get_page_unless_zero(page_head))) {
/* Ref to put_compound_page() comment. */
if (likely(page != page_head && get_page_unless_zero(page_head))) {
/* Ref to put_compound_page() comment. */
@@
-922,10
+922,14
@@
void __init swap_setup(void)
#endif
/* Use a smaller cluster for small-memory machines */
#endif
/* Use a smaller cluster for small-memory machines */
+#ifdef CONFIG_ZRAM
+ page_cluster = 0; // disable swap read-ahead
+#else
if (megs < 16)
page_cluster = 2;
else
page_cluster = 3;
if (megs < 16)
page_cluster = 2;
else
page_cluster = 3;
+#endif
/*
* Right now other parts of the system means that we
* _really_ don't want to cluster much more
/*
* Right now other parts of the system means that we
* _really_ don't want to cluster much more