Re: [PATCH v2] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-07-05 Thread Dave Hansen
On 07/04/2018 10:47 PM, Bin Yang wrote: > When changing a 4K page attr inside 1G/2M large page range, > __change_page_attr() will call try_preserve_large_page() to decide > to split the big page or not. And try_preserve_large_page() will > call static_protections() to check all 4K pages inside the

Re: [PATCH v2] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-07-04 Thread Thomas Gleixner
On Thu, 5 Jul 2018, Bin Yang wrote: > static inline pgprot_t static_protections(pgprot_t prot, unsigned long > address, > -unsigned long pfn) > +unsigned long pfn, unsigned long *page_num) > { > pgprot_t forbidden = __pgprot(0

[PATCH v2] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-07-04 Thread Bin Yang
When changing a 4K page attr inside 1G/2M large page range, __change_page_attr() will call try_preserve_large_page() to decide to split the big page or not. And try_preserve_large_page() will call static_protections() to check all 4K pages inside the large page range one by one. The check loop is v