linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH] s390: Remove PageDirty check inside mk_pte()
Date: Mon, 3 Feb 2025 14:03:02 +0100	[thread overview]
Message-ID: <Z6C+hmI/Hz8eh43R@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com> (raw)
In-Reply-To: <Z5v5YHaAtsENqzrZ@casper.infradead.org>

On Thu, Jan 30, 2025 at 10:12:48PM +0000, Matthew Wilcox wrote:
> On Mon, Jan 20, 2025 at 05:39:43PM +0100, Alexander Gordeev wrote:
> > Despite the commit 75edd345e8ed claim above I still observed that a read
> > access to shmem page could end up in creation of a dirty PTE:
> > 
> > 	handle_pte_fault() -> do_pte_missing() -> do_fault() ->
> > 	do_read_fault() -> finish_fault() -> set_pte_range() -> mk_pte()
> > 
> > Our internal discussion (among other things) ended up in a need to really
> > understand where the faults are coming from.
> > 
> > Further, a cursory LTP test was showing ~18K page faults increase, which
> > I did not confirm. That is the first thing I will re-do.
> > 
> > Whether this change is a pre-requisite for something or what is your aim
> > wrt to this patch?
> 
> One of the things that needs to happen for the splitting of struct page
> and struct folio is the removal of all '&folio->page'.  Most are in
> compatibility code or code that is being transitioned and can safely be
> ignored.  One of the places that needs to be changed is:
> 
> 	entry = mk_pte(&folio->page, vma->vm_page_prot);
> (there's a few places like this).
> 
> I believe we need a folio_mk_pte(), and I don't want to define it for
> each architecture.  I don't even want to have a default implementation
> and allow arches to override.

I guess, folio_mk_pte() would then still call arch-specific mk_pte()?

> So the question becomes whether to:
> 
> (a) Get rid of the conditional pte_mkdirty() entirely (this trial
>     balloon)
> (b) Put it in folio_mk_pte() for everybody, not just s390
> (c) Put it in set_pte_range() as David suggested.
> 
> It's feeling like (c) is the best idea.

I will check option (c)

Thanks!


  reply	other threads:[~2025-02-03 13:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 21:23 Matthew Wilcox (Oracle)
2025-01-20 16:39 ` Alexander Gordeev
2025-01-20 19:01   ` David Hildenbrand
2025-01-30 22:12   ` Matthew Wilcox
2025-02-03 13:03     ` Alexander Gordeev [this message]
2025-02-12 12:44       ` Alexander Gordeev
2025-02-12 13:08         ` Claudio Imbrenda
2025-02-12 16:43           ` Matthew Wilcox

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=Z6C+hmI/Hz8eh43R@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox