linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: Yang Shi <shy828301@gmail.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Zi Yan <ziy@nvidia.com>, Michal Hocko <mhocko@suse.com>,
	Huang Ying <ying.huang@intel.com>,
	Hugh Dickins <hughd@google.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	linux-s390@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [v2 PATCH 1/7] mm: memory: add orig_pmd to struct vm_fault
Date: Tue, 18 May 2021 08:36:18 +0100	[thread overview]
Message-ID: <20210518073618.GA3672@suse.de> (raw)
In-Reply-To: <CAHbLzkoj6Vn_jjWrn99oio1Oi+D4CHw9Z+6Wy4Squz-jCh2DKw@mail.gmail.com>

On Mon, May 17, 2021 at 12:39:49PM -0700, Yang Shi wrote:
> On Mon, May 17, 2021 at 8:09 AM Mel Gorman <mgorman@suse.de> wrote:
> >
> > On Tue, Apr 13, 2021 at 02:24:10PM -0700, Yang Shi wrote:
> > > Add orig_pmd to struct vm_fault so the "orig_pmd" parameter used by huge page
> > > fault could be removed, just like its PTE counterpart does.
> > >
> > > Signed-off-by: Yang Shi <shy828301@gmail.com>
> > >
> > > <SNIP>
> > >
> > > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > > index 25b9041f9925..9c5856f8cc81 100644
> > > --- a/include/linux/mm.h
> > > +++ b/include/linux/mm.h
> > > @@ -547,6 +547,9 @@ struct vm_fault {
> > >                                        * the 'address'
> > >                                        */
> > >       pte_t orig_pte;                 /* Value of PTE at the time of fault */
> > > +     pmd_t orig_pmd;                 /* Value of PMD at the time of fault,
> > > +                                      * used by PMD fault only.
> > > +                                      */
> > >
> > >       struct page *cow_page;          /* Page handler may use for COW fault */
> > >       struct page *page;              /* ->fault handlers should return a
> >
> > Could this be a union?
> 
> Do you mean orig_pte and orig_pmd, or cow_page and page?

orig_pte and orig_pmd given that one for PTE faults and one is for PMD
faults and it's very unlikely they would both need to be considered during
a single fault.

-- 
Mel Gorman
SUSE Labs


  reply	other threads:[~2021-05-18  7:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 21:24 [v2 RFC PATCH 0/7] mm: thp: use generic THP migration for NUMA hinting fault Yang Shi
2021-04-13 21:24 ` [v2 PATCH 1/7] mm: memory: add orig_pmd to struct vm_fault Yang Shi
2021-05-17 15:09   ` Mel Gorman
2021-05-17 19:39     ` Yang Shi
2021-05-18  7:36       ` Mel Gorman [this message]
2021-05-18 17:03         ` Yang Shi
2021-04-13 21:24 ` [v2 PATCH 2/7] mm: memory: make numa_migrate_prep() non-static Yang Shi
2021-05-17 15:11   ` Mel Gorman
2021-04-13 21:24 ` [v2 PATCH 4/7] mm: migrate: account THP NUMA migration counters correctly Yang Shi
2021-05-17 15:28   ` Mel Gorman
2021-04-13 21:24 ` [v2 PATCH 5/7] mm: migrate: don't split THP for misplaced NUMA page Yang Shi
2021-05-17 15:29   ` Mel Gorman
2021-04-13 21:24 ` [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count Yang Shi
2021-04-14  3:00   ` Huang, Ying
2021-04-14 15:02     ` Zi Yan
2021-04-15  6:45       ` Huang, Ying
2021-04-15 18:57         ` Zi Yan
2021-04-14 17:23     ` Yang Shi
2021-04-13 21:24 ` [v2 PATCH 7/7] mm: thp: skip make PMD PROT_NONE if THP migration is not supported Yang Shi
2021-05-17 15:30   ` Mel Gorman
2021-05-03 21:58 ` [v2 RFC PATCH 0/7] mm: thp: use generic THP migration for NUMA hinting fault Yang Shi
     [not found] ` <20210413212416.3273-4-shy828301@gmail.com>
2021-04-14  2:43   ` [v2 PATCH 3/7] mm: thp: refactor NUMA fault handling Huang, Ying
2021-04-14 17:15     ` Yang Shi
2021-05-17 15:27   ` Mel Gorman
2021-05-17 19:41     ` Yang Shi

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=20210518073618.GA3672@suse.de \
    --to=mgorman@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=shy828301@gmail.com \
    --cc=ying.huang@intel.com \
    --cc=ziy@nvidia.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;
as well as URLs for NNTP newsgroup(s).