linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Hongchen Zhang <zhanghongchen@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: fix pmd_mkinvalid
Date: Tue, 12 Jul 2022 13:19:17 +0200	[thread overview]
Message-ID: <20220712111917.GA10936@alpha.franken.de> (raw)
In-Reply-To: <0fd4e823-493f-07f0-08d5-f4a22491b602@loongson.cn>

On Tue, Jul 12, 2022 at 06:01:08PM +0800, Hongchen Zhang wrote:
> On 2022/7/7 下午7:12, Hongchen Zhang wrote:
> > On 2022/7/7 下午5:22, Thomas Bogendoerfer wrote:
> > > On Thu, Jul 07, 2022 at 04:11:35PM +0800, Hongchen Zhang wrote:
> > > > When a pmd entry is invalidated by pmd_mkinvalid,pmd_present should
> > > > return true.
> > > > So introduce a _PMD_PRESENT_INVALID_SHIFT bit to check if a pmd is
> > > > present but invalidated by pmd_mkinvalid.
> > > 
> > > What problem are you trying to fix ? What are the symptoms ?
> > > 
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > 
> > > the test robot showed problems with your last version of the patch,
> > > which hasn't been integrated into at least the MIPS tree, so no
> > > need to that.
> > > 
> > > Thomas.
> > > 
> > 
> > Hi Thomas,
> >    The idea come from the commit:
> >    b65399f6111b(arm64/mm: Change THP helpers to comply with generic MM
> >  semantics).
> >    There is an problem now:
> >          CPU 0        CPU 1
> >      pmdp_invalidate        do_page_fault
> >      ...              __handle_mm_fault
> >                      is_swap_pmd == true
> >                      trigger VM_BUG_ON() ?
> >      set_pmd_at
> >    the reason is that pmd_present return true,after this commit
> >    pmd_present will return false,and the VM_BUG_ON will not be triggered.
> >    Like arm64 does,we can introduce a new bit to fix this.
> > 
> > Thanks.
> Hi Thomas,
>  Is there problem of this patch? What's your opinion of this patch?

I haven't dig deeper into it, but needing more page bits is a pain
for 32bit kernel and would make it nearly impossible to get huge
page support there. And the description you gave me, needs to be
in the commit description.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2022-07-12 11:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  8:11 [PATCH] MIPS: fix pmd_mkinvalid Hongchen Zhang
2022-07-07  9:22 ` Thomas Bogendoerfer
2022-07-07 11:12   ` Hongchen Zhang
2022-07-12 10:01     ` Hongchen Zhang
2022-07-12 11:19       ` Thomas Bogendoerfer [this message]
2022-07-12 12:08         ` Hongchen Zhang
  -- strict thread matches above, loose matches on Subject: below --
2022-07-06  9:07 Hongchen Zhang
2022-07-06 19:23 ` kernel test robot
2022-05-31  4:36 Hongchen Zhang
2022-05-31 15:40 ` Jiaxun Yang
2022-06-01  0:55   ` Hongchen Zhang

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=20220712111917.GA10936@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=zhanghongchen@loongson.cn \
    /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).