All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Joanne Koong <joannelkoong@gmail.com>,
	lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Improving large folio writeback performance
Date: Wed, 22 Jan 2025 12:15:14 +0100	[thread overview]
Message-ID: <d72edb71-20ee-4a7a-87a9-7d62fb31cf48@redhat.com> (raw)
In-Reply-To: <Z4pmlmnXuf4mBLqk@casper.infradead.org>

On 17.01.25 15:17, Matthew Wilcox wrote:
> On Fri, Jan 17, 2025 at 12:56:52PM +0100, Jan Kara wrote:
>> On Fri 17-01-25 12:40:15, Vlastimil Babka wrote:
>>> I think this might be tricky in some cases? I.e. with 2 MB and pmd-mapped
>>> folio, it's possible to write-protect only the whole pmd, not individual 32k
>>> chunks in order to catch the first write to a chunk to mark it dirty.
>>
>> Definitely. Once you map a folio through PMD entry, you have no other
>> option than consider whole 2MB dirty. But with PTE mappings or
>> modifications through syscalls you can do more fine-grained dirtiness
>> tracking and there're enough cases like that that it pays off.
> 
> Almost no applications use shared mmap writes to write to files.  The
> error handling story is crap and there's only limited control about when
> writeback actually happens.  Almost every application uses write(), even
> if they have the file mmaped.  This isn't a scenario worth worrying about.

Right, for example while ordinary files can be used for backing VMs, VMs 
permanently dirty a lot of memory, resulting in a constant writeback 
stream and nasty storage wear (so I've been told). There are some use 
cases for it, but we primarily use shmem/memfd/anon instead.

-- 
Cheers,

David / dhildenb


      reply	other threads:[~2025-01-22 11:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15  0:50 [LSF/MM/BPF TOPIC] Improving large folio writeback performance Joanne Koong
2025-01-15  1:21 ` Dave Chinner
2025-01-16 20:14   ` Joanne Koong
2025-01-15  1:50 ` Darrick J. Wong
2025-01-16 11:01 ` [Lsf-pc] " Jan Kara
2025-01-16 23:38   ` Joanne Koong
2025-01-17 11:53     ` Jan Kara
2025-01-17 22:45       ` Joanne Koong
2025-01-20 22:42         ` Jan Kara
2025-01-22  0:29           ` Joanne Koong
2025-01-22  9:22             ` Jan Kara
2025-01-22 22:17               ` Joanne Koong
2025-01-17 11:40 ` Vlastimil Babka
2025-01-17 11:56   ` [Lsf-pc] " Jan Kara
2025-01-17 14:17     ` Matthew Wilcox
2025-01-22 11:15       ` David Hildenbrand [this message]

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=d72edb71-20ee-4a7a-87a9-7d62fb31cf48@redhat.com \
    --to=david@redhat.com \
    --cc=jack@suse.cz \
    --cc=joannelkoong@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.