Subject: [merged] memcg-reduce-function-dereference.patch removed from -mm tree To: handai.szj@xxxxxxxxxx,h.huangqiang@xxxxxxxxxx,jeff.liu@xxxxxxxxxx,mhocko@xxxxxxx,nishimura@xxxxxxxxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 13 Sep 2013 13:02:40 -0700 The patch titled Subject: memcg: reduce function dereference has been removed from the -mm tree. Its filename was memcg-reduce-function-dereference.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Sha Zhengju <handai.szj@xxxxxxxxxx> Subject: memcg: reduce function dereference This function dereferences res far too often, so optimize it. Signed-off-by: Sha Zhengju <handai.szj@xxxxxxxxxx> Signed-off-by: Qiang Huang <h.huangqiang@xxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxx> Cc: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> Cc: Jeff Liu <jeff.liu@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/res_counter.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff -puN kernel/res_counter.c~memcg-reduce-function-dereference kernel/res_counter.c --- a/kernel/res_counter.c~memcg-reduce-function-dereference +++ a/kernel/res_counter.c @@ -178,27 +178,30 @@ u64 res_counter_read_u64(struct res_coun #endif int res_counter_memparse_write_strategy(const char *buf, - unsigned long long *res) + unsigned long long *resp) { char *end; + unsigned long long res; /* return RES_COUNTER_MAX(unlimited) if "-1" is specified */ if (*buf == '-') { - *res = simple_strtoull(buf + 1, &end, 10); - if (*res != 1 || *end != '\0') + res = simple_strtoull(buf + 1, &end, 10); + if (res != 1 || *end != '\0') return -EINVAL; - *res = RES_COUNTER_MAX; + *resp = RES_COUNTER_MAX; return 0; } - *res = memparse(buf, &end); + res = memparse(buf, &end); if (*end != '\0') return -EINVAL; - if (PAGE_ALIGN(*res) >= *res) - *res = PAGE_ALIGN(*res); + if (PAGE_ALIGN(res) >= res) + res = PAGE_ALIGN(res); else - *res = RES_COUNTER_MAX; + res = RES_COUNTER_MAX; + + *resp = res; return 0; } _ Patches currently in -mm which might be from handai.szj@xxxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html