Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-09-04 Thread Yang, Bin
On Tue, 2018-09-04 at 17:11 +0800, Bin Yang wrote: > On Tue, 2018-09-04 at 09:49 +0200, Thomas Gleixner wrote: > > On Tue, 4 Sep 2018, Yang, Bin wrote: > > > On Mon, 2018-09-03 at 23:57 +0200, Thomas Gleixner wrote: > > > > > > > > The last patch which does the overlap check is equally broken: > >

Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-09-04 Thread Yang, Bin
On Tue, 2018-09-04 at 09:49 +0200, Thomas Gleixner wrote: > On Tue, 4 Sep 2018, Yang, Bin wrote: > > On Mon, 2018-09-03 at 23:57 +0200, Thomas Gleixner wrote: > > > > > > The last patch which does the overlap check is equally broken: > > > > Sorry that I did not understand the broken of last patc

Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-09-04 Thread Thomas Gleixner
On Tue, 4 Sep 2018, Yang, Bin wrote: > On Mon, 2018-09-03 at 23:57 +0200, Thomas Gleixner wrote: > > > > The last patch which does the overlap check is equally broken: > > Sorry that I did not understand the broken of last patch. I meant 4/5 sorry. That's the one which introduces the overlap che

Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-09-04 Thread Yang, Bin
On Mon, 2018-09-03 at 23:57 +0200, Thomas Gleixner wrote: > On Tue, 21 Aug 2018, Bin Yang wrote: > > --- a/arch/x86/mm/pageattr.c > > +++ b/arch/x86/mm/pageattr.c > > @@ -629,6 +629,22 @@ try_preserve_large_page(pte_t *kpte, unsigned long > > address, > > new_prot = static_protections(req_prot

Re: [PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-09-03 Thread Thomas Gleixner
On Tue, 21 Aug 2018, Bin Yang wrote: > --- a/arch/x86/mm/pageattr.c > +++ b/arch/x86/mm/pageattr.c > @@ -629,6 +629,22 @@ try_preserve_large_page(pte_t *kpte, unsigned long > address, > new_prot = static_protections(req_prot, address, pfn); > > /* > + * The static_protections()

[PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-08-20 Thread Bin Yang
In try_preserve_large_page(), the check for pgprot_val(new_prot) == pgprot_val(old_port) can definitely be done at first to avoid redundant checking. The approach and some of the comments came from Thomas Gleixner's email example for how to do this Suggested-by: Thomas Gleixner Signed-off-by: Bi