From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP
Date: Mon, 23 Jul 2018 13:46:57 +0000 [thread overview]
Message-ID: <20180723154657.3872fa70@windsurf> (raw)
In-Reply-To: <474bbdcc-d78f-faa0-b2c3-3650cc870b36@cogentembedded.com>
Hello,
On Fri, 15 Jun 2018 19:04:45 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 06/15/2018 06:52 PM, Thomas Petazzoni wrote:
>
> > The fast path of get_user_pages_fast() disables IRQs and then does:
> >
> > - gup_pud_range()
> > - gup_pmd_range()
> > - gup_pte_range()
> > - flush_dcache_page()
> >
> > However, flush_dcache_page() makes a smp_call_function(), and using
> > smp_call_function() when IRQs are disabled is not allowed.
> >
> > In order to work around this problem, this commit prevents the fast
> > path from get_user_pages_fast() from being used on SMP, and directly
> ^^^^ of?
> Else it sounds a bit tautological...
Yes, agreed.
I can fix that up for a v2, or perhaps such a small typo can be fixed
while applying the patches.
Could someone review and/or merge those patches ?
I sent four patches, which are still pending:
[PATCH] arch/sh: kernel: use KERN_CONT in print_sh_insn()
[PATCH] arch/sh: kernel: use KERN_CONT in dump_mem()
[PATCH] arch/sh: fix SH4 flush_dcache_all() for SMP
[PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP
Note that this last one is more a workaround than a proper fix. It does
the job, but there is very likely a better solution, and I was hoping
to get some insights/suggestions.
Thanks a lot,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP
Date: Mon, 23 Jul 2018 15:46:57 +0200 [thread overview]
Message-ID: <20180723154657.3872fa70@windsurf> (raw)
In-Reply-To: <474bbdcc-d78f-faa0-b2c3-3650cc870b36@cogentembedded.com>
Hello,
On Fri, 15 Jun 2018 19:04:45 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 06/15/2018 06:52 PM, Thomas Petazzoni wrote:
>
> > The fast path of get_user_pages_fast() disables IRQs and then does:
> >
> > - gup_pud_range()
> > - gup_pmd_range()
> > - gup_pte_range()
> > - flush_dcache_page()
> >
> > However, flush_dcache_page() makes a smp_call_function(), and using
> > smp_call_function() when IRQs are disabled is not allowed.
> >
> > In order to work around this problem, this commit prevents the fast
> > path from get_user_pages_fast() from being used on SMP, and directly
> ^^^^ of?
> Else it sounds a bit tautological...
Yes, agreed.
I can fix that up for a v2, or perhaps such a small typo can be fixed
while applying the patches.
Could someone review and/or merge those patches ?
I sent four patches, which are still pending:
[PATCH] arch/sh: kernel: use KERN_CONT in print_sh_insn()
[PATCH] arch/sh: kernel: use KERN_CONT in dump_mem()
[PATCH] arch/sh: fix SH4 flush_dcache_all() for SMP
[PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP
Note that this last one is more a workaround than a proper fix. It does
the job, but there is very likely a better solution, and I was hoping
to get some insights/suggestions.
Thanks a lot,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-07-23 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-15 15:52 [PATCH] arch/sh: use slow path for get_user_pages_fast() on SMP Thomas Petazzoni
2018-06-15 15:52 ` Thomas Petazzoni
2018-06-15 16:04 ` Sergei Shtylyov
2018-06-15 16:04 ` Sergei Shtylyov
2018-06-15 19:27 ` Thomas Petazzoni
2018-06-15 19:27 ` Thomas Petazzoni
2018-07-23 13:46 ` Thomas Petazzoni [this message]
2018-07-23 13:46 ` Thomas Petazzoni
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=20180723154657.3872fa70@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=dalias@libc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--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 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.