From patchwork Sat Jan 5 00:19:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 10749011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7499214E5 for ; Sat, 5 Jan 2019 00:20:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60AD8287F5 for ; Sat, 5 Jan 2019 00:20:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53D06287FA; Sat, 5 Jan 2019 00:20:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B649287F5 for ; Sat, 5 Jan 2019 00:20:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D1D18E0110; Fri, 4 Jan 2019 19:20:52 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 433B88E00F9; Fri, 4 Jan 2019 19:20:52 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2FB378E0110; Fri, 4 Jan 2019 19:20:52 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it1-f197.google.com (mail-it1-f197.google.com [209.85.166.197]) by kanga.kvack.org (Postfix) with ESMTP id 045EF8E00F9 for ; Fri, 4 Jan 2019 19:20:52 -0500 (EST) Received: by mail-it1-f197.google.com with SMTP id b14so2197750itd.1 for ; Fri, 04 Jan 2019 16:20:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=tpU+aXWfRIFmKejztq32i/zmcUqi50WJVBEvfCwY/bY=; b=jC0ab8buIfGMWJSIz31Ie+hOJssl51rGGbu6Coj2YJaw9M66B300afnKXD3Uhbirus I0/wVxx6/2yDMtgAkzAcmmJV5JLCLxEWGkgajeDjt41fAyTJnDeqWCBbrbS1BwCR3FEj 9E9UcOAM1u3IjpENnWiZvPhcW3wk89WqMCGVnjvOx33vpyuWxU92dI3yuccmyPPV/FBt PsS0oEi2xQ9+K1VLZDNG0YDCGSazG0Rw7JYqZ2DxkZXxtv1fPrkNnuymxHGPQw+hsxJA N+JzGqdaeM5HhT6b6682tGRBD7o+wzb/iCzCcWcKT7my3wHxwuUk29tTGJKSgPlCLaQt JT8Q== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of yang.shi@linux.alibaba.com designates 115.124.30.133 as permitted sender) smtp.mailfrom=yang.shi@linux.alibaba.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alibaba.com X-Gm-Message-State: AA+aEWZ1tdZYFVRO6U0WVnV5y1U9YfQrC/pghZBIEO2i7RiKN6x/xKEI 2nfLB/ZE5CPBtTPZmYrdS5n/j1kNOCLFJtSGckagn5pLvozw43SA/oKtxh/WTU/nU48Tn1FXdPj 7IirLYIXLlGxGhAy67k7zbFOYgkjDaqhnu/Ir4a1EdQbWlhWnNZWXVl10SCdkzVh4fg== X-Received: by 2002:a02:960e:: with SMTP id c14mr37643885jai.84.1546647651750; Fri, 04 Jan 2019 16:20:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/X5OI/XtaYUTwrkAh1GWgxEmFuDxYO7ITFId45oba+hTnh/t9N9znvp82iswVsFL+ftL4XZ X-Received: by 2002:a02:960e:: with SMTP id c14mr37643871jai.84.1546647650961; Fri, 04 Jan 2019 16:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546647650; cv=none; d=google.com; s=arc-20160816; b=qfrnIuCBqmKvpl7tqRRFYDVIUt59VjhgT2VFencffeRC28lQnwqHvmv8lTYTfGGVZb HP02+ZKROBE3zgnHFAMaqCrnJvanteCo7QUMDCP788UiQJs3R8mXOsLFul0PiGRd6lS9 4rVkgGdDLcYrE8H9GAGDau88tODBfaVXiYaWNlM7C21b9RzOcqAVHFjU+7mcSJ/ilC6i NPh71JJvpNX7+ZuxU7ZhBMXcloCMKmmj3lJn27smxRRLgN3d8Mld0P6WQLxz+0bySIu7 SOsxP2irdtmVFnbErJYg++kfXIEoYU4CJ1BopRQvNKhfwkTz+mka1iTom8VjFhSr8pfY 6PDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=tpU+aXWfRIFmKejztq32i/zmcUqi50WJVBEvfCwY/bY=; b=tqsGBtOVeoNS0vmAzgh/Ds3XmH5vmiuT9whebIUuDFHNZ1FMmOuB57qPdnfuo8RUaJ pOQrw9P8jIap7qw/5esqtaPwpeyfp53ubr7qytwUUrmSGWh9cF9J7CBvEQloc+16baPA aa4Hvmo862OblO6gbvbLKa5Q0Le1JpqFJwD55Fsod6zagbzxF3Tl0BaZtcpC4s2+stdk UGkcO1MhUifqESZfXNrGb5IvE5VNhGt8w7HkOAmvbbvvhqm032c/mXOEnP4JISCBpWAq hnvbwqlGiVLZrU0m79dTgWlQaBHEueVEKxBhFeIK+TQa5bBHMrd4ReUCpgT0p9LUR4W5 x5Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of yang.shi@linux.alibaba.com designates 115.124.30.133 as permitted sender) smtp.mailfrom=yang.shi@linux.alibaba.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com. [115.124.30.133]) by mx.google.com with ESMTPS id k8si569153itk.97.2019.01.04.16.20.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Jan 2019 16:20:50 -0800 (PST) Received-SPF: pass (google.com: domain of yang.shi@linux.alibaba.com designates 115.124.30.133 as permitted sender) client-ip=115.124.30.133; Authentication-Results: mx.google.com; spf=pass (google.com: domain of yang.shi@linux.alibaba.com designates 115.124.30.133 as permitted sender) smtp.mailfrom=yang.shi@linux.alibaba.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alibaba.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07486;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0THYi1he_1546647563; Received: from e19h19392.et15sqa.tbsite.net(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0THYi1he_1546647563) by smtp.aliyun-inc.com(127.0.0.1); Sat, 05 Jan 2019 08:19:31 +0800 From: Yang Shi To: mhocko@suse.com, hannes@cmpxchg.org, shakeelb@google.com, akpm@linux-foundation.org Cc: yang.shi@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [v2 PATCH 5/5] doc: memcontrol: add description for wipe_on_offline Date: Sat, 5 Jan 2019 08:19:20 +0800 Message-Id: <1546647560-40026-6-git-send-email-yang.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1546647560-40026-1-git-send-email-yang.shi@linux.alibaba.com> References: <1546647560-40026-1-git-send-email-yang.shi@linux.alibaba.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Add desprition of wipe_on_offline interface in cgroup documents. Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Yang Shi --- Documentation/admin-guide/cgroup-v2.rst | 9 +++++++++ Documentation/cgroup-v1/memory.txt | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 0290c65..e4ef08c 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1303,6 +1303,15 @@ PAGE_SIZE multiple when read back. memory pressure happens. If you want to avoid that, force_empty will be useful. + memory.wipe_on_offline + + This is similar to force_empty, but it just does memory reclaim + asynchronously in css offline kworker. + + Writing into 1 will enable it, disable it by writing into 0. + + It would reclaim as much as possible memory just as what force_empty does. + Usage Guidelines ~~~~~~~~~~~~~~~~ diff --git a/Documentation/cgroup-v1/memory.txt b/Documentation/cgroup-v1/memory.txt index 8e2cb1d..1c6e1ca 100644 --- a/Documentation/cgroup-v1/memory.txt +++ b/Documentation/cgroup-v1/memory.txt @@ -71,6 +71,7 @@ Brief summary of control files. memory.stat # show various statistics memory.use_hierarchy # set/show hierarchical account enabled memory.force_empty # trigger forced page reclaim + memory.wipe_on_offline # trigger forced page reclaim when offlining memory.pressure_level # set memory pressure notifications memory.swappiness # set/show swappiness parameter of vmscan (See sysctl's vm.swappiness) @@ -581,6 +582,15 @@ hierarchical_= N0= N1= ... The "total" count is sum of file + anon + unevictable. +5.7 wipe_on_offline + +This is similar to force_empty, but it just does memory reclaim asynchronously +in css offline kworker. + +Writing into 1 will enable it, disable it by writing into 0. + +It would reclaim as much as possible memory just as what force_empty does. + 6. Hierarchy support The memory controller supports a deep hierarchy and hierarchical accounting.