From: Heiko Carstens <hca@linux.ibm.com>
To: Peter Xu <peterx@redhat.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Will Deacon <will@kernel.org>, Matt Turner <mattst88@gmail.com>,
linux-s390@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Brian Cain <bcain@quicinc.com>, Borislav Petkov <bp@alien8.de>,
linux-alpha@vger.kernel.org, Alistair Popple <apopple@nvidia.com>,
Jonas Bonn <jonas@southpole.se>,
linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
linux-snps-arc@lists.infradead.org,
Vineet Gupta <vgupta@kernel.org>,
Vasily Gorbik <gor@linux.ibm.com>,
Vlastimil Babka <vbabka@suse.cz>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Rich Felker <dalias@libc.org>,
sparclinux@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
David Hildenbrand <david@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Nicholas Piggin <npiggin@gmail.com>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org,
Richard Henderson <rth@twiddle.net>, Guo Ren <guoren@kernel.org>,
linux-parisc@vger.kernel.org,
Andrea Arcangeli <aarcange@redhat.com>,
Helge Deller <deller@gmx.de>, Al Viro <viro@zeniv.linux.org.uk>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-um@lists.infradead.org, "H . Peter Anvin" <hpa@zytor.com>,
Janosch Frank <frankja@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
openrisc@lists.librecores.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-hexagon@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
Stafford Horne <shorne@gmail.com>,
linux-csky@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
linux-mips@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Dinh Nguyen <dinguyen@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
"David S . Miller" <davem@davemloft.net>,
Johannes Weiner <hannes@cmpxchg.org>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-riscv@lists.infradead.org,
Max Filippov <jcmvbkbc@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Johannes Berg <johannes@sipsolutions.net>,
Chris Zankel <chris@zankel.net>, Michal Simek <monstr@monstr.eu>,
x86@kernel.org, Yoshinori Sato <ysato@users.sourceforge.jp>,
Dave Hansen <dave.hansen@linux.intel.com>,
Richard Weinberger <richard@nod.at>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types
Date: Mon, 30 May 2022 19:03:31 +0200 [thread overview]
Message-ID: <YpT443jVZtM6p9OD@osiris> (raw)
In-Reply-To: <YpTqNKMTt8PoA41n@xz-m1.local>
On Mon, May 30, 2022 at 12:00:52PM -0400, Peter Xu wrote:
> On Mon, May 30, 2022 at 11:52:54AM -0400, Peter Xu wrote:
> > On Mon, May 30, 2022 at 11:35:10AM +0200, Christian Borntraeger wrote:
> > > > diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
> > > > index 4608cc962ecf..e1d40ca341b7 100644
> > > > --- a/arch/s390/mm/fault.c
> > > > +++ b/arch/s390/mm/fault.c
> > > > @@ -436,12 +436,11 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
> > > > /* The fault is fully completed (including releasing mmap lock) */
> > > > if (fault & VM_FAULT_COMPLETED) {
> > > > - /*
> > > > - * Gmap will need the mmap lock again, so retake it. TODO:
> > > > - * only conditionally take the lock when CONFIG_PGSTE set.
> > > > - */
> > > > - mmap_read_lock(mm);
> > > > - goto out_gmap;
> > > > + if (gmap) {
> > > > + mmap_read_lock(mm);
> > > > + goto out_gmap;
> > > > + }
fault = 0; <----
> > > > + goto out;
>
> Hmm, right after I replied I found "goto out" could be problematic, since
> all s390 callers of do_exception() will assume it an error condition (side
> note: "goto out_gmap" contains one step to clear "fault" to 0). I'll
> replace this with "return 0" instead if it looks good to both of you.
>
> I'll wait for a confirmation before reposting. Thanks,
Right, that was stupid. Thanks for double checking!
However could you please add "fault = 0" just in front of the goto out
like above? I'd like to avoid having returns and gotos mixed.
next prev parent reply other threads:[~2022-05-30 17:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 19:39 [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types Peter Xu
2022-05-29 20:33 ` Heiko Carstens
2022-05-30 9:35 ` Christian Borntraeger
2022-05-30 15:52 ` Peter Xu
2022-05-30 16:00 ` Peter Xu
2022-05-30 17:03 ` Heiko Carstens [this message]
2022-05-30 18:29 ` Peter Xu
2022-05-30 18:29 ` Christian Borntraeger
2022-05-30 4:04 ` Michael Ellerman
2022-05-30 13:31 ` Catalin Marinas
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=YpT443jVZtM6p9OD@osiris \
--to=hca@linux.ibm.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aarcange@redhat.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=aou@eecs.berkeley.edu \
--cc=apopple@nvidia.com \
--cc=bcain@quicinc.com \
--cc=benh@kernel.crashing.org \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chris@zankel.net \
--cc=dalias@libc.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=deller@gmx.de \
--cc=dinguyen@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=geert@linux-m68k.org \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jcmvbkbc@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=jonas@southpole.se \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=mattst88@gmail.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=openrisc@lists.librecores.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=paulus@samba.org \
--cc=peterx@redhat.com \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=rth@twiddle.net \
--cc=shorne@gmail.com \
--cc=sparclinux@vger.kernel.org \
--cc=stefan.kristiansson@saunalahti.fi \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=vbabka@suse.cz \
--cc=vgupta@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=ysato@users.sourceforge.jp \
/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).