linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vernon Yang <vernon2gm@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vernon Yang <vernon2gm@gmail.com>,
	hughd@google.com, baolin.wang@linux.alibaba.com,
	da.gomez@samsung.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Vernon Yang <yanglincheng@kylinos.cn>
Subject: Re: [PATCH] mm: shmem: fix too little space for tmpfs only fallback 4KB
Date: Tue, 9 Sep 2025 22:16:34 +0800	[thread overview]
Message-ID: <441CA7B5-4D1C-4334-AC1A-2CDA87530478@gmail.com> (raw)
In-Reply-To: <20250908162220.480d7014cc6c6ad2e14748c5@linux-foundation.org>



> On Sep 9, 2025, at 07:22, Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> On Mon,  8 Sep 2025 20:31:28 +0800 Vernon Yang <vernon2gm@gmail.com> wrote:
> 
>> From: Vernon Yang <yanglincheng@kylinos.cn>
>> 
>> When the system memory is sufficient, allocating memory is always
>> successful, but when tmpfs size is low (e.g. 1MB), it falls back
>> directly from 2MB to 4KB, and other small granularity (8KB ~ 1024KB)
>> will not be tried.
>> 
>> Therefore add check whether the remaining space of tmpfs is sufficient
>> for allocation. If there is too little space left, try smaller large
>> folio.
> 
> Thanks.
> 
> What are the effects of this change?  I'm assuming it's an
> *improvement*, rather than a fix for some misbehavior?
> 

When we use tmpfs and the tmpfs space is getting smaller and smaller 
(e.g. less than 2MB), it can still allocate 8KB~1MB large folio.

Thank you for your feedback.


  reply	other threads:[~2025-09-09 14:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 12:31 Vernon Yang
2025-09-08 23:22 ` Andrew Morton
2025-09-09 14:16   ` Vernon Yang [this message]
2025-09-09  5:58 ` Baolin Wang
2025-09-09 12:29   ` Vernon Yang
2025-09-22  1:46     ` Baolin Wang
2025-09-22  2:51       ` Vernon Yang
2025-09-22  3:09         ` Baolin Wang

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=441CA7B5-4D1C-4334-AC1A-2CDA87530478@gmail.com \
    --to=vernon2gm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=da.gomez@samsung.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yanglincheng@kylinos.cn \
    /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