Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp223053imu; Wed, 2 Jan 2019 18:18:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN5OpdYWcutrgfrO2Z+uE7+AiprVSTRBNajUjselfqyaYsq3jDrrbU3t+0sQgTKBNo2i7Jb+ X-Received: by 2002:a17:902:c5:: with SMTP id a63mr46124745pla.267.1546481892799; Wed, 02 Jan 2019 18:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546481892; cv=none; d=google.com; s=arc-20160816; b=bjuoHvGQBXZnSlklcqCDLFoFHtaOHLFkse8Wp9P5DVWNhS2UgUNWmicWFLJSkT/mjc gNTsY5J6iSKXlMf6DBkzJfDOQQ7JLxKyS5nMbmXfhXLk8zlVYO+9g2nLflIDMAlXEwS4 r0bVnkovPXnIbnhuORnyqcALQgI6ErZumgBs5YU0tlISoTiaGrLZQH/0xUUc+uUGGy0Q w8KXQH4YzQ/V0HPv1V6SwgtFXukepZCV1TTyiZNP3Comzr9SKPx+kN3RHQag9Trg1SC2 rwOIGykWX2oOT/J64hSSJabMoK03K9jtDoQHFd7A2QzcsDNkrfKBQvOW9shYxNWCWo+u Manw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=D0puuOBT2pD/XnAHjsSo/6sVuD3uUPGP+UfDkXMy5oA=; b=WBxhD+c4/P5Pe+0eKfkqzaTK6H8PDoiU8xDA4YqaYSsJkH3ol3WJmszl5YhV0dJTX9 cZOr22DXAxZ/m000BXZDrK4FJ2P+HRPtiq6M3BmLkNXG6CWJUDyB1AUyPhWjGQ1dzH7X Q+G/BDUYnwC7qXeZoaaZcN9RpOTKVlBv5Sf7gPlODCRuvkZi97UdZqzOMYuquYdOUD0i Bi7qyI5FiqOP4HRTnuwRdxls8unmUixRzbyRz8tAsZiELH1D5rA70SBRDsfiOgA6xzNp hzAET2NpVweAmelGKLkYhkKYhm+SdnX4szlH1hlhkKJNso3i1jickiL2NbK74pE55G1b xu0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ee3OGe78; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si23684231pgw.472.2019.01.02.18.17.57; Wed, 02 Jan 2019 18:18:12 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=ee3OGe78; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727214AbfABVqC (ORCPT + 99 others); Wed, 2 Jan 2019 16:46:02 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:46378 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbfABVqB (ORCPT ); Wed, 2 Jan 2019 16:46:01 -0500 Received: by mail-yb1-f195.google.com with SMTP id n16so2414689ybg.13 for ; Wed, 02 Jan 2019 13:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D0puuOBT2pD/XnAHjsSo/6sVuD3uUPGP+UfDkXMy5oA=; b=ee3OGe781HrG7cNNgDlY6Y1ESKVx3Ll3q10QZPrg1Xjsv1Nd/mY3Er7+cJRoosc5UL wNQARPudiXv0kWIpSJpH2iweIdt02p4syLpsPFNMu/a0k1jVhYRGevnNVbu84KD8vl1g ZCmzt+4y16g9hQ8Ye4yMw2Q97rc9tK5iyvFyP9NSUldVT5Od49FRffiFymyDFGyjSgHq SgP8iNEVAjRld8qaJ9sJ5w6nF2QRasvf5G0MXM2BQW26t/GJ+bLkhI5903g+hIBbZqMc JxEv8JMoLa+Sfe+Gkf2SRtP3V+T4u8BAUhGMmjm2VIbLaGml/VQo9tdZEe04Y4Sd1rtw NQjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D0puuOBT2pD/XnAHjsSo/6sVuD3uUPGP+UfDkXMy5oA=; b=jWAcZWHgjJeHmEXWgc3BvXpUMm2bkiuRr26HZHy44HSD7agXAISpGJtFPfvcH41Guf CVNEj6knSvcbnHh7bNqY19syoRhC6HB1UdUDGtTCK+nEAFujEEBawoZktUvIuMYWT9nQ 7A/L1NJMa1wEF+8IanthkxzM5UFCELZwgv+84gqA/3jaXOcqHkseEleH5DSIwViI2s58 e1GzdQmKNH5Gsefoeup0TTXfH9B4aRfjSyvTxbSqLkxT3/4TJBrWmCP37XH9pHsdPDO9 HD69DITQ/LLoQDlc6yrsMJlX7VY8ik3+MoMunlQRrhBiKMRtwfhcsGdWY1oG/mTI5koN sW5A== X-Gm-Message-State: AJcUukcS0d53kB5lj2ES+pu7xz5i4J4iA3aBeixUsuZQ7X72d5GAtAPr Qm3rsspgZQR5GtYLGeyp9ezp44rM4SXP8jCIUkWe+Xdv6iM1bg== X-Received: by 2002:a5b:f01:: with SMTP id x1mr41195493ybr.464.1546465560576; Wed, 02 Jan 2019 13:46:00 -0800 (PST) MIME-Version: 1.0 References: <1546459533-36247-1-git-send-email-yang.shi@linux.alibaba.com> <1546459533-36247-3-git-send-email-yang.shi@linux.alibaba.com> In-Reply-To: <1546459533-36247-3-git-send-email-yang.shi@linux.alibaba.com> From: Shakeel Butt Date: Wed, 2 Jan 2019 13:45:49 -0800 Message-ID: Subject: Re: [PATCH 2/3] mm: memcontrol: do not try to do swap when force empty To: Yang Shi Cc: Michal Hocko , Johannes Weiner , Andrew Morton , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 2, 2019 at 12:06 PM Yang Shi wrote: > > The typical usecase of force empty is to try to reclaim as much as > possible memory before offlining a memcg. Since there should be no > attached tasks to offlining memcg, the tasks anonymous pages would have > already been freed or uncharged. Anon pages can come from tmpfs files as well. > Even though anonymous pages get > swapped out, but they still get charged to swap space. So, it sounds > pointless to do swap for force empty. > I understand that force_empty is typically used before rmdir'ing a memcg but it might be used differently by some users. We use this interface to test memory reclaim behavior (anon and file). Anyways, I am not against changing the behavior, we can adapt internally but there might be other users using this interface differently. thanks, Shakeel