From: Ingo Molnar <mingo@kernel.org>
To: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Ralf Baechle <ralf@linux-mips.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] s390: Add pmd_mknotpresent()
Date: Tue, 30 Oct 2012 08:25:58 +0100 [thread overview]
Message-ID: <20121030072558.GB4537@gmail.com> (raw)
In-Reply-To: <20121029150048.21c062cf@thinkpad>
* Gerald Schaefer <gerald.schaefer@de.ibm.com> wrote:
> On Sun, 28 Oct 2012 14:10:14 +0100
> Ingo Molnar <mingo@kernel.org> wrote:
>
> >
> > There's a related problem on s390: other THP implementations
> > have pmd_mknotpresent() while s390 not, resulting in:
> >
> > mm/huge_memory.c:1543:2: error: implicit declaration of function 'pmd_mknotpresent'
> >
> > The (untested!) patch below adds the s390 version of this
> > method.
> >
> > Gerald, Martin, did I get the S390 details right?
>
> The upstream thp patches for s390 fixed that by adding pmdp_invalidate() and
> replacing the pmd_mknotpresent() in mm/huge_memory.c, see git commit 46dcde73.
> The pmdp_invalidate() is already included linux-next, so it should be ok to
> just change mm/huge_memory.c similar to upstream:
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index f1c2679..842b6df 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -1537,8 +1537,7 @@ static int __split_huge_page_map(struct page *page,
> * complete. The ptl also protects against concurrent faults due to
> * making the pmd not-present.
> */
> - set_pmd_at(mm, address, pmd, pmd_mknotpresent(*pmd));
> - flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
> + pmdp_invalidate(vma, address, pmd);
> pmd_populate(mm, pmd, pgtable);
> ret = 1;
>
> With this, s390 does not need a pmd_mknotpresent(), and using
> set_pmd_at(..., pmd_mknotpresent()) would be wrong on s390
> anyway because we need a flushing operation to change a valid
> pmd.
Ok, great - so to me it seems that once the two trees are merged
there's no extra change needed for s390 - so I dropped the
patch.
Thanks,
Ingo
next prev parent reply other threads:[~2012-10-30 7:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 6:22 linux-next: build failure after merge of the final tree (tip/s390 trees related) Stephen Rothwell
2012-10-18 14:51 ` Ralf Baechle
2012-10-19 2:56 ` Stephen Rothwell
2012-10-19 21:48 ` Ingo Molnar
2012-10-18 15:02 ` Ralf Baechle
2012-10-19 21:52 ` Peter Zijlstra
2012-10-19 22:36 ` Ingo Molnar
2012-10-19 22:39 ` Ingo Molnar
2012-10-20 2:31 ` Stephen Rothwell
2012-10-18 16:26 ` Gerald Schaefer
2012-10-19 2:57 ` Stephen Rothwell
2012-10-19 21:37 ` Ingo Molnar
2012-10-28 13:10 ` [PATCH] s390: Add pmd_mknotpresent() Ingo Molnar
2012-10-29 7:49 ` Martin Schwidefsky
2012-10-29 11:05 ` Ingo Molnar
2012-10-29 11:30 ` Martin Schwidefsky
2012-10-29 14:00 ` Gerald Schaefer
2012-10-30 7:25 ` Ingo Molnar [this message]
2012-10-18 18:29 ` linux-next: build failure after merge of the final tree (tip/s390 trees related) Ingo Molnar
2012-10-19 3:07 ` Stephen Rothwell
2012-10-19 22:43 ` Ingo Molnar
2012-10-20 2:32 ` Stephen Rothwell
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=20121030072558.GB4537@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=gerald.schaefer@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=schwidefsky@de.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/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).