From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDE53C7618A for ; Mon, 20 Mar 2023 11:14:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7704C6B0075; Mon, 20 Mar 2023 07:14:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 71EAE6B0078; Mon, 20 Mar 2023 07:14:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 60D826B007B; Mon, 20 Mar 2023 07:14:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4DA486B0075 for ; Mon, 20 Mar 2023 07:14:31 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1BB2A1A0377 for ; Mon, 20 Mar 2023 11:14:31 +0000 (UTC) X-FDA: 80589018342.27.5AE091C Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by imf16.hostedemail.com (Postfix) with ESMTP id 22F5D18000F for ; Mon, 20 Mar 2023 11:14:27 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.111 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679310869; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d6+H5fCJMrA2gfwU2oOFVHYOxdHhxxbtemAdUPsbQ1A=; b=BEGWFJxOLfsFXUdcFIO8Nb/e9d6OOgcs823sT/PRZVi4zxAz8g7gru0wyU2FJw2fiPqLGm 5HFaO4MnEU9xQY4kgjWuqbSdzfdXB3mWH0E78gtfiWjRScG06l/iY8rwpw2o04j+fUrPF3 PsMMX2JgtH3B7crbMi32z53S0rS72xw= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.111 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679310869; a=rsa-sha256; cv=none; b=Taj/zxQLlJ9b8DM5p8OQssbOxg2w4eoplfL+ctM8WiNjqRVpNcYa51hcLezBLOL+0lfI9G 2Ss30+5i8EthsGS+gAakaWhUto6Q80rnos42SbkMpd32wo9hZjSr2l5M39hUlnbLmC+M8n x3yU5wv8ZYlP18yIpVanKoft6zP8M94= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0VeHD6Jp_1679310862; Received: from 30.240.99.157(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VeHD6Jp_1679310862) by smtp.aliyun-inc.com; Mon, 20 Mar 2023 19:14:23 +0800 Content-Type: multipart/alternative; boundary="------------zQWtcJgRUINiutF5uEBq9Rx0" Message-ID: Date: Mon, 20 Mar 2023 19:14:22 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2 0/6] tmpfs: add the option to disable swap To: Luis Chamberlain Cc: hughd@google.com, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, linux-mm@kvack.org, p.raghav@samsung.com, da.gomez@samsung.com, a.manzanares@samsung.com, dave@stgolabs.net, yosryahmed@google.com, keescook@chromium.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org References: <20230309230545.2930737-1-mcgrof@kernel.org> From: haoxin In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: e81hyr3t5k3wjmwtauqs3gujw6iaig5y X-Rspamd-Queue-Id: 22F5D18000F X-HE-Tag: 1679310867-595577 X-HE-Meta: U2FsdGVkX1/+MdZbLbbPIolmZYlqr1AbRhC/UFOZAKT3thYl0EeZ6sjTz/lUXtO9Tr+0e8ZiYlvylMmRu6wJR+1UYLM+WbfZkmoPS2DG5CIob92hFohWsehxo5VJynDvAijpV+ZO2zvBHa0w9SgNFuPZo8kUIZcOEVYqtOdjF0zYkm5TiZELDvPAwsegluGYfHFxzqg+ydjprPotgvHAg72/EwIqP8XB8Wip0vnP+LvmWyYs8yi6g2h5RWpEuUSeZDcRdwwo+IjFafElD0qSwKVpEmDIqiKzHx5MAUHxMg72TJBaTPz4QDgkabCUY2iwLLLGgVTcoVpqW8UNjSNIfjxsUUqpX3E0oqahmNYhtqWJ+puIydo4YQABTrYGJNcfeKID7hYzhkPLrSmtaBDJYxs0qKwLaoukmEv6z0QgCiKU12a1B3pmL0Mh5K5CiGrjHRJpODOl1FuM6wDsTHX1DxOawvNSWjK4ck2yoJYgu/REBXCSoxZvQ3MtskquS7R2TBy8G0IKXnCayI1yNZOelDGSf+DTyjEpVtWvVthDhTdu9cWYOQhsHcer/0oTIFkgffZR/w53Gt0MWY8so1izDL/zIwbG7HSBv8ik8RSmJjO3lM6PS6SBiHMWM348T2aU/eCNI+HnBBA38aOsYqN/ptoa9xwKUP9lhmP+dTO1vgvzw2PNskrvMJ6puRcuMdV1PwuEV9KZ2aL1nGMjBYUu+Cd8DONvvo/aYxOxE1eTnxwcEh4L03yFvuJl/S8RBbFFq/ntToaarsdjFnx+wm2Q7Fv6GVQg74ZDcF+RsvyM1TNDLm1S/fl9t5LxZhmXWOySfCLw8KnO7cqE9G5o8XOb+Xo2KRMuORcGtQypp4r3Hflo+sraMjIe2fH48ACq8gjw2XhK1prjjKJYgmslktjv+mlzqpnphZqyD6erypuoU8Ls6WdGxm+crFw8soqICVTVRGWNtHTX8ybDpRm4Ur8 cPZCZpYI VQ/vxwDHtwpa1H20WtjJGRsHLYg3kvANOq12w3rM7/mgJl8GgcK0mZTe0yeAn1xfav/XRTg+OmsNi0IGF258HTLv5Ec1DnRb/Lfxly44qIuzmA5bMzDm7jc6+ZKy2RPEmBZlwrschIjdpZ4dDyDvsiYWNG1T5rBiv4uYwGu0LPXiuWHMv5uY+N+qNRedHbbeP8pTGAxdET4HdODBsi5cGcqOfs4h6ZwxXngiGEQMuf1/6BCyDqbicwAPX3SYXLLUueeRKE3hn7QxtMhuRUm/EBI1hg4Uea8nwaB4thlmUvdMCg5c+9TBbm4DTpKPOYjx7BevsGGfJ2SoGNC1aivjif3hC39PJtKuX5IwF 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: This is a multi-part message in MIME format. --------------zQWtcJgRUINiutF5uEBq9Rx0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 2023/3/20 上午4:32, Luis Chamberlain 写道: > On Tue, Mar 14, 2023 at 10:46:28AM +0800, haoxin wrote: >> All these series looks good to me and i do some test on my virtual machine >> it works well. >> >> so please add Tested-by: Xin Hao . >> >> just one question, if tmpfs pagecache occupies a large amount of memory, how >> can we ensure successful memory reclamation in case of memory shortage? > If you're disabling swap then you know the only thing you can do is > unmount if you want to help the VM, otherwise the pressure is just > greater for the VM. Un, what i mean is can we add a priority so that this type of pagecache is reclaimed last ? Instead of just setting the parameter noswap to make it unreclaimed, because if such pagecache which occupy big part of memory which can not be reclaimed, it will cause OOM. > > Luis --------------zQWtcJgRUINiutF5uEBq9Rx0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


在 2023/3/20 上午4:32, Luis Chamberlain 写道:
On Tue, Mar 14, 2023 at 10:46:28AM +0800, haoxin wrote:
All these series looks good to me and i do some test on my virtual machine
it works well.

so please add Tested-by: Xin Hao <xhao@linux.alibaba.com> .

just one question, if tmpfs pagecache occupies a large amount of memory, how
can we ensure successful memory reclamation in case of memory shortage?
If you're disabling swap then you know the only thing you can do is
unmount if you want to help the VM, otherwise the pressure is just
greater for the VM.

Un, what i mean is can we add a priority so that this type of pagecache is reclaimed last ?

Instead of just setting the parameter noswap to make it unreclaimed, because if such pagecache which

occupy big part of memory which can not be reclaimed, it will cause OOM.



  Luis
--------------zQWtcJgRUINiutF5uEBq9Rx0--