Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5187452imm; Wed, 12 Sep 2018 02:21:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYJ2kNnm9EDYjw8t4AS8z9AmTrSZPZktpXBWgD/S7QzRcXwz39sHJl0Knh0eB/1Xi7MfyLX X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr1205684pfi.22.1536744094512; Wed, 12 Sep 2018 02:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536744094; cv=none; d=google.com; s=arc-20160816; b=gGaNxBpAGRGr2W6zBkdmeMh6zRFdqsgecS1OeibFAJHJK5rJVBlZxdrl+rm8MGTpoV cil2uxLr82EVS6uOKHT8RzDpfDbEUJrv6Jd9NE3sqd2CbTUJuuE/IaqPJol0wbBC/6gd 6U6IKLduVdCpijl2LQ/RX4W0b/bf8R9UFt42w2lNoWVNYW594FuRDOqIjfC9GysWEk5M xNBwCjZefkB86LAtpKJqJcfboPu9+K1tjaZDySvgypGw+/+IYOaC0LrJhMHo1fXwfHn/ owP4I/CZKbOPwjZuZQ8LyAe1g1CWjMFxJW/ubIJNeoFzGz0DWbGwypPrKNdjbXdjG+pF 1kng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=yaDO1n8E3hwQdIenYexCJk2mXV09cLv08j7l7IHCOoc=; b=yh+RGXuSRs2sSrt5WMzsfRuTNo3tA2mDD76rJks2NqzqSz3voKNMYNxKQa5MHRxADl HjcHjA7+DBejfaTx1RdLMTKmycSCZ1cgHGHn4Ot0rRxrYAp3UKOAYldcgfXNZizfiMJ/ BqDI9dYsttMZvyBQ5/FtwZj4gfdTfR+qDzg8VkXhCHELX+w4H+Wi9rrX04bD30umFcPd xEmgC2V1Ewqae9fbRN+F8Nf24rIzDUhS6GwMegL2sfdna00OpWFyLYK+Eosux4F1iMfd dH0wLoDSrhv1FKi4OMrNCKlbF0OvdLEJMLk0Cycjy1G5ejaRgjpW8Yl3lGKcLolQ3j8i mfIQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19-v6si436195plo.432.2018.09.12.02.21.18; Wed, 12 Sep 2018 02:21:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbeILOXW (ORCPT + 99 others); Wed, 12 Sep 2018 10:23:22 -0400 Received: from mx60.baidu.com ([61.135.168.60]:20575 "EHLO tc-sys-mailedm01.tc.baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727006AbeILOXW (ORCPT ); Wed, 12 Sep 2018 10:23:22 -0400 Received: from localhost (cp01-cos-dev01.cp01.baidu.com [10.92.119.46]) by tc-sys-mailedm01.tc.baidu.com (Postfix) with ESMTP id 766832040041; Wed, 12 Sep 2018 17:19:20 +0800 (CST) From: Li RongQing To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com Subject: [PATCH] memcg: remove congestion wait when force empty Date: Wed, 12 Sep 2018 17:19:20 +0800 Message-Id: <1536743960-19703-1-git-send-email-lirongqing@baidu.com> X-Mailer: git-send-email 1.7.10.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org memory.force_empty is used to empty a memory cgoup memory before rmdir it, avoid to charge those memory into parent cgroup when try_to_free_mem_cgroup_pages returns 0, guess there maybe be lots of writeback, so wait. but the waiting and sleep will called in shrink_inactive_list, based on numbers of isolated page, so remove this wait to reduce unnecessary delay Signed-off-by: Li RongQing --- mm/memcontrol.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4ead5a4817de..35bd43eaa97e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2897,12 +2897,8 @@ static int mem_cgroup_force_empty(struct mem_cgroup *memcg) progress = try_to_free_mem_cgroup_pages(memcg, 1, GFP_KERNEL, true); - if (!progress) { + if (!progress) nr_retries--; - /* maybe some writeback is necessary */ - congestion_wait(BLK_RW_ASYNC, HZ/10); - } - } return 0; -- 2.16.2