Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7936423imu; Mon, 3 Dec 2018 23:26:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/XqqgCu5Fo/Eg5yOJLhoyqhrneGdVbeeer8pXqOsOM8bnkdF+Mqjg7CDAUjx+WiuyBz+JxD X-Received: by 2002:a63:1412:: with SMTP id u18mr15620864pgl.247.1543908408739; Mon, 03 Dec 2018 23:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543908408; cv=none; d=google.com; s=arc-20160816; b=npZfwW6n06lXx0PuomJ84wojyGUQ7OALHWQApcZySjpT8p1jleb2eOyi4vwyRMSHb3 xyg+Y4gZ+Asi3v5oSEut9hperwy7vQOU8mkkogcQfuZfWPlv8nw4cMMiBW1gno9tbTNx 5EzcfHpeIuCDlYxVJNVGcgArj7oKF8XEwLRWbJ6coe5p+PK85dhnUNxLfLmwyauBXleA tj9ZbblPJFP/TpRimM+i3mSbjwyVjZXWdHPWLnQOpJo4cQ2IID+oGhUDVW8uhd8LKt5U xbIOh70vJ8W9oTVJM8eY0DEkbkFIzA93zaj3tBmbR8MLZUo3UqdcZz2OKS01sWC6Z65I faiQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OWxVxUFNFAJKgJiPBTOcedeAXWBx0sZZ9avSzTxrysM=; b=YuS/c25Q7L5zeo5eXpIdB1GBjfq7y23TFit+GoNV6AK4H9OWlmnqftm9cvaxeTIe/N 0Il4LdQjgKrSwiLRp9PHMboYy2ITlOp7CE/4LA+NyJBnND8An/LOJpUKeeu9B1brAAsP uqs9te8lV5+DMVk0f5ridSSq0E5Os+BvRgujVl3xdkdeSvAxGNuJszoXPTe8NHR/CeFR SVaDXJ+uilMN66K+7ZMYSSZb1nt+okvu0LHmYktzJU4XlLdUjLP9FlQKwjMxYsdUfvCS tgpyHt7gda8I2lG5fXDQv1FEcov0BDYV/xuTUso/jNQQWp/qSnX2Z+xr0EhHN9X75oaa 19UA== 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 v19si17238802pfa.80.2018.12.03.23.26.33; Mon, 03 Dec 2018 23:26:48 -0800 (PST) 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 S1726154AbeLDHZN (ORCPT + 99 others); Tue, 4 Dec 2018 02:25:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:42172 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726082AbeLDHZN (ORCPT ); Tue, 4 Dec 2018 02:25:13 -0500 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 9E869ACCF; Tue, 4 Dec 2018 07:25:09 +0000 (UTC) Date: Tue, 4 Dec 2018 08:25:08 +0100 From: Michal Hocko To: Xunlei Pang Cc: Roman Gushchin , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/3] mm/vmscan: Enable kswapd to reclaim low-protected memory Message-ID: <20181204072508.GU31738@dhcp22.suse.cz> References: <20181203080119.18989-1-xlpang@linux.alibaba.com> <20181203080119.18989-2-xlpang@linux.alibaba.com> <20181203115646.GP31738@dhcp22.suse.cz> <54a3f0a6-6e7d-c620-97f2-ac567c057bc2@linux.alibaba.com> <20181203172007.GG31738@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Tue 04-12-18 10:40:29, Xunlei Pang wrote: > On 2018/12/4 AM 1:22, Michal Hocko wrote: > > On Mon 03-12-18 23:20:31, Xunlei Pang wrote: > >> On 2018/12/3 下午7:56, Michal Hocko wrote: > >>> On Mon 03-12-18 16:01:18, Xunlei Pang wrote: > >>>> There may be cgroup memory overcommitment, it will become > >>>> even common in the future. > >>>> > >>>> Let's enable kswapd to reclaim low-protected memory in case > >>>> of memory pressure, to mitigate the global direct reclaim > >>>> pressures which could cause jitters to the response time of > >>>> lantency-sensitive groups. > >>> > >>> Please be more descriptive about the problem you are trying to handle > >>> here. I haven't actually read the patch but let me emphasise that the > >>> low limit protection is important isolation tool. And allowing kswapd to > >>> reclaim protected memcgs is going to break the semantic as it has been > >>> introduced and designed. > >> > >> We have two types of memcgs: online groups(important business) > >> and offline groups(unimportant business). Online groups are > >> all configured with MAX low protection, while offline groups > >> are not at all protected(with default 0 low). > >> > >> When offline groups are overcommitted, the global memory pressure > >> suffers. This will cause the memory allocations from online groups > >> constantly go to the slow global direct reclaim in order to reclaim > >> online's page caches, as kswap is not able to reclaim low-protection > >> memory. low is not hard limit, it's reasonable to be reclaimed by > >> kswapd if there's no other reclaimable memory. > > > > I am sorry I still do not follow. What role do offline cgroups play. > > Those are certainly not low mem protected because mem_cgroup_css_offline > > will reset them to 0. > > > > Oh, I meant "offline groups" to be "offline-business groups", memcgs > refered to here are all "online state" from kernel's perspective. What is offline-business group? Please try to explain the actual problem in much more details and do not let us guess. -- Michal Hocko SUSE Labs