From: haoxin <xhao@linux.alibaba.com>
To: Luis Chamberlain <mcgrof@kernel.org>
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
Subject: Re: [PATCH v2 0/6] tmpfs: add the option to disable swap
Date: Tue, 21 Mar 2023 19:37:45 +0800 [thread overview]
Message-ID: <4102154a-1e49-54d9-b18f-c41da84e643e@linux.alibaba.com> (raw)
In-Reply-To: <ZBjR15Tr1o98crup@bombadil.infradead.org>
在 2023/3/21 上午5:36, Luis Chamberlain 写道:
> On Mon, Mar 20, 2023 at 07:14:22PM +0800, haoxin wrote:
>> 在 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 ?
> That seems to be a classifier request for something much less aggressive
> than mapping_set_unevictable(). My patches *prior* to using mapping_set_unevictable()
> are I think closer to what it seems you want, but as noted before by
> folks, that also puts unecessary stress on the VM because just fail
> reclaim on our writepage().
>
>> 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.
> You can't simultaneously retain possession of a cake and eat it, too,
> once you eat it, its gone and noswap eats the cake because of the
> suggestion / decision to follow through with mapping_set_unevictable().
>
> It sounds like you want to make mapping_set_unevictable() optional and
> deal with the possible stress incurred writepage() failing?
Yes, Just a personal idea, in any way, the current patch is an excellent
implementation, thank you very much.
> Not quite
> sure what else to recommend here.
>
> Luis
next prev parent reply other threads:[~2023-03-21 11:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 23:05 Luis Chamberlain
2023-03-09 23:05 ` [PATCH v2 1/6] shmem: remove check for folio lock on writepage() Luis Chamberlain
2023-03-09 23:05 ` [PATCH v2 2/6] shmem: set shmem_writepage() variables early Luis Chamberlain
2023-03-09 23:05 ` [PATCH v2 3/6] shmem: move reclaim check early on writepages() Luis Chamberlain
2023-03-09 23:05 ` [PATCH v2 4/6] shmem: skip page split if we're not reclaiming Luis Chamberlain
2023-03-09 23:09 ` Yosry Ahmed
2023-04-18 4:41 ` Hugh Dickins
2023-04-18 21:11 ` Luis Chamberlain
2023-04-18 21:20 ` Hugh Dickins
2023-03-09 23:05 ` [PATCH v2 5/6] shmem: update documentation Luis Chamberlain
2023-04-18 5:29 ` Hugh Dickins
2023-04-18 21:20 ` Luis Chamberlain
2023-04-18 21:41 ` Hugh Dickins
2023-04-18 21:49 ` Luis Chamberlain
2023-03-09 23:05 ` [PATCH v2 6/6] shmem: add support to ignore swap Luis Chamberlain
2023-04-18 5:50 ` Hugh Dickins
2023-04-18 7:38 ` Christian Brauner
2023-04-18 21:51 ` Luis Chamberlain
2023-04-20 8:57 ` [PATCH] shmem: restrict noswap option to initial user namespace Christian Brauner
2023-04-20 19:18 ` Luis Chamberlain
2023-04-18 21:22 ` [PATCH v2 6/6] shmem: add support to ignore swap Luis Chamberlain
2023-04-18 21:30 ` Randy Dunlap
2023-03-14 1:21 ` [PATCH v2 0/6] tmpfs: add the option to disable swap Davidlohr Bueso
2023-03-14 2:46 ` haoxin
2023-03-19 20:32 ` Luis Chamberlain
2023-03-20 11:14 ` haoxin
2023-03-20 21:36 ` Luis Chamberlain
2023-03-21 11:37 ` haoxin [this message]
2023-04-18 4:31 ` Hugh Dickins
2023-04-18 20:55 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4102154a-1e49-54d9-b18f-c41da84e643e@linux.alibaba.com \
--to=xhao@linux.alibaba.com \
--cc=a.manzanares@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=da.gomez@samsung.com \
--cc=dave@stgolabs.net \
--cc=hughd@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=patches@lists.linux.dev \
--cc=willy@infradead.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox