mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
workaround fix long page fault issue
- change version to 2 - exit page fault with EIO if waited long time - reduce log and enlarge page fault warning timeout to 500ms Change-Id: I87858443d639c43cc804931063fe71daf0eccc96 Signed-off-by: huangzq2 <huangzq2@motorola.com> Reviewed-on: https://gerrit.mot.com/2792701 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
47cbbdadeb
commit
266fc07dff
2 changed files with 10 additions and 4 deletions
|
|
@ -174,7 +174,7 @@ struct hyb_entries_table {
|
|||
(index) != (hindex); (index) = (tmp), (tmp) = prev_index((index), (tab)))
|
||||
|
||||
static unsigned long warn_level[HYB_CLASS_BUTT] = {
|
||||
0, 200, 500, 0
|
||||
0, 500, 500, 0
|
||||
};
|
||||
|
||||
const char *key_point_name[HYB_KYE_POINT_BUTT] = {
|
||||
|
|
@ -4946,7 +4946,7 @@ static int hybridswap_permcg_reclaim(struct mem_cgroup *memcg,
|
|||
atomic64_inc(&hybs->hybridswap_outcnt);
|
||||
|
||||
out:
|
||||
hybp(HYB_INFO, "memcg %s %lu %lu out_to_eswap %lu KB eswap %lu zram %lu %d\n",
|
||||
hybp(HYB_DEBUG, "memcg %s %lu %lu out_to_eswap %lu KB eswap %lu zram %lu %d\n",
|
||||
hybs->name, (unsigned long)require_size_before, (unsigned long)require_size,
|
||||
(unsigned long)((require_size_before - require_size) >> 10),
|
||||
(unsigned long)atomic64_read(&hybs->hybridswap_stored_size),
|
||||
|
|
@ -4998,7 +4998,7 @@ static int hybridswap_permcg_reclaimin(struct mem_cgroup *memcg,
|
|||
rq->reclaimined_sz += mcg_reclaimed_size;
|
||||
mutex_unlock(&hybs->swap_lock);
|
||||
|
||||
hybp(HYB_INFO, "memcg %s mcg_reclaimed_size %lu rq->reclaimined_sz %lu rq->size %lu rq->out_size %lu ret %d\n",
|
||||
hybp(HYB_DEBUG, "memcg %s mcg_reclaimed_size %lu rq->reclaimined_sz %lu rq->size %lu rq->out_size %lu ret %d\n",
|
||||
hybs->name, mcg_reclaimed_size, rq->reclaimined_sz,
|
||||
rq->size, rq->out_size, ret);
|
||||
|
||||
|
|
@ -5304,6 +5304,12 @@ static int hybridswap_page_fault_fetch_eswap(struct zram *zram,
|
|||
if (likely(iowork->ioentry->eswapid != -EBUSY))
|
||||
break;
|
||||
|
||||
// Moto: waited enough, exit with EIO.
|
||||
if (wait_cycle > 100000) {
|
||||
hybp(HYB_ERR, "waited 100000 cycles in page fault, exit with EIO!\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (wait_cycle < 100)
|
||||
udelay(50);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#endif
|
||||
#include "hybridswap_internal.h"
|
||||
|
||||
#define MOTO_SWAP_VERSION 1
|
||||
#define MOTO_SWAP_VERSION 2
|
||||
|
||||
struct swapd_param {
|
||||
unsigned int min_grade;
|
||||
|
|
|
|||
Loading…
Reference in a new issue