Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp78719imm; Thu, 2 Aug 2018 23:19:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcfS+XCViyMUqgyjCBYYm4pLUgHX9hv6Ta1jClsFAQMvdI2el6/NNLo3nu8WlgIHulcudum X-Received: by 2002:a65:6203:: with SMTP id d3-v6mr2346089pgv.420.1533277169201; Thu, 02 Aug 2018 23:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533277169; cv=none; d=google.com; s=arc-20160816; b=BUtO7uwOKv3Su2OOgU0dm+q8SM5aBk4o6vfD+TW2mkrozEc9DdBAIQ01+V6NNJ6ldL LBXbFzO8iRRl60xye8tJcpq9rgO5aKCaXjm4nTGhIfuFvpThz0m2QZslczHUIXDNo2xn 3DuEVHf8tCvXokrfeKRFLrReAAW2J3RhV9tna2JxpsavnepwINSgHvPJp64PhCWp377+ 6kcjEwZJN7QJzwHlN8eCyiL8HRo2k9cDu0IoK5yLYq0zCndLmsPDt4BP+nvqvJxnUqfa /sZ4/lfGeuUw56xeEafBaoQLl4bzvf6sivg97gJT9x5UEyZWTAlOo+6kl1MKG5Q2TCGZ AfSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=QUh4aC/9VFHljESpCvuRbfhAikUfLs4ndPzPaXBVWGg=; b=rH9P12DtOt7+oUZ+UZT4yooqhf6TT3i6luTFP/hmnXbz2bpA7g57lRvi/UTaDlHOXY sRC2/qoUWqAN4zmxtZlHGRPKFt2N3EiJL0mPQN8gVsI/sIfQQ9W23/eIhXVSckFhrVWr 9hmC0Q+05kFrzN7s5H8/89+Vb0uAmXzg2rhcdsSAFeFeeqNtxJHcwrN3riC8karKHGXz cETWZ+g4Mlv5g1N1jOevtWb5e8h/BGAt8csjB23PiETgCTchSgyMasx+8Unops3MGJ7M WXIHsq3aMkr5vquIaI5fHO1a0CG/bDxuW2EaqjgUGaaDO2+hegymqHZMXfUSbMcTeTa3 vo/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65-v6si3989906pgb.377.2018.08.02.23.19.14; Thu, 02 Aug 2018 23:19:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728415AbeHCIND (ORCPT + 99 others); Fri, 3 Aug 2018 04:13:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:54034 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727705AbeHCINC (ORCPT ); Fri, 3 Aug 2018 04:13:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4FDE3AE1E; Fri, 3 Aug 2018 06:18:18 +0000 (UTC) Date: Fri, 3 Aug 2018 08:18:17 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Steven Rostedt , Ingo Molnar , Johannes Weiner , Vladimir Davydov , "open list:MEMORY MANAGEMENT" , cgroups@vger.kernel.org, LKML , kernel-patch-test@lists.linaro.org Subject: Re: [PATCH v1] mm:memcg: skip memcg of current in mem_cgroup_soft_limit_reclaim Message-ID: <20180803061817.GC27245@dhcp22.suse.cz> References: <1533275285-12387-1-git-send-email-zhaoyang.huang@spreadtrum.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 03-08-18 14:11:26, Zhaoyang Huang wrote: > On Fri, Aug 3, 2018 at 1:48 PM Zhaoyang Huang wrote: > > > > for the soft_limit reclaim has more directivity than global reclaim, we40960 > > have current memcg be skipped to avoid potential page thrashing. > > > The patch is tested in our android system with 2GB ram. The case > mainly focus on the smooth slide of pictures on a gallery, which used > to stall on the direct reclaim for over several hundred > millionseconds. By further debugging, we find that the direct reclaim > spend most of time to reclaim pages on its own with softlimit set to > 40960KB. I add a ftrace event to verify that the patch can help > escaping such scenario. Furthermore, we also measured the major fault > of this process(by dumpsys of android). The result is the patch can > help to reduce 20% of the major fault during the test. I have asked already asked. Why do you use the soft limit in the first place? It is known to cause excessive reclaim and long stalls. -- Michal Hocko SUSE Labs