Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-28 Thread Toshiki Fukasawa
On 2019/08/28 23:18, Waiman Long wrote: > On 8/28/19 10:09 AM, Michal Hocko wrote: >> On Wed 28-08-19 09:46:21, Waiman Long wrote: >>> On 8/28/19 4:00 AM, Michal Hocko wrote: On Tue 27-08-19 16:22:38, Michal Hocko wrote: > Dan, isn't this something we have discussed recently? This

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-28 Thread Waiman Long
On 8/28/19 10:09 AM, Michal Hocko wrote: > On Wed 28-08-19 09:46:21, Waiman Long wrote: >> On 8/28/19 4:00 AM, Michal Hocko wrote: >>> On Tue 27-08-19 16:22:38, Michal Hocko wrote: Dan, isn't this something we have discussed recently? >>> This was >>>

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-28 Thread Michal Hocko
On Wed 28-08-19 09:46:21, Waiman Long wrote: > On 8/28/19 4:00 AM, Michal Hocko wrote: > > On Tue 27-08-19 16:22:38, Michal Hocko wrote: > >> Dan, isn't this something we have discussed recently? > > This was > > http://lkml.kernel.org/r/20190725023100.31141-3-t-fukas...@vx.jp.nec.com > > and

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-28 Thread Waiman Long
On 8/28/19 4:00 AM, Michal Hocko wrote: > On Tue 27-08-19 16:22:38, Michal Hocko wrote: >> Dan, isn't this something we have discussed recently? > This was > http://lkml.kernel.org/r/20190725023100.31141-3-t-fukas...@vx.jp.nec.com > and talked about /proc/kpageflags but this is essentially the

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-28 Thread Michal Hocko
On Tue 27-08-19 16:22:38, Michal Hocko wrote: > Dan, isn't this something we have discussed recently? This was http://lkml.kernel.org/r/20190725023100.31141-3-t-fukas...@vx.jp.nec.com and talked about /proc/kpageflags but this is essentially the same thing AFAIU. I hope we get a consistent

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-27 Thread Michal Hocko
Dan, isn't this something we have discussed recently? On Mon 26-08-19 08:43:36, Waiman Long wrote: > It was found that on a dual-socket x86-64 system with nvdimm, reading > /proc/kpagecount may cause the system to panic: > > === > [ 79.917682] BUG: unable to handle page fault

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-26 Thread Matthew Wilcox
On Mon, Aug 26, 2019 at 09:43:24AM -0400, Waiman Long wrote: > On 8/26/19 9:25 AM, Matthew Wilcox wrote: > > On Mon, Aug 26, 2019 at 08:43:36AM -0400, Waiman Long wrote: > >> It was found that on a dual-socket x86-64 system with nvdimm, reading > >> /proc/kpagecount may cause the system to panic:

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-26 Thread Waiman Long
On 8/26/19 9:43 AM, Waiman Long wrote: > On 8/26/19 9:25 AM, Matthew Wilcox wrote: >> >> Would this not work equally well? >> >> +++ b/fs/proc/page.c >> @@ -46,7 +46,8 @@ static ssize_t kpagecount_read(struct file *file, char >> __user *buf, >> ppage = pfn_to_page(pfn); >>

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-26 Thread Waiman Long
On 8/26/19 9:25 AM, Matthew Wilcox wrote: > On Mon, Aug 26, 2019 at 08:43:36AM -0400, Waiman Long wrote: >> It was found that on a dual-socket x86-64 system with nvdimm, reading >> /proc/kpagecount may cause the system to panic: >> >> === >> [ 79.917682] BUG: unable to handle

Re: [PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-26 Thread Matthew Wilcox
On Mon, Aug 26, 2019 at 08:43:36AM -0400, Waiman Long wrote: > It was found that on a dual-socket x86-64 system with nvdimm, reading > /proc/kpagecount may cause the system to panic: > > === > [ 79.917682] BUG: unable to handle page fault for address: fffe > [

[PATCH v2] fs/proc/page: Skip uninitialized page when iterating page structures

2019-08-26 Thread Waiman Long
It was found that on a dual-socket x86-64 system with nvdimm, reading /proc/kpagecount may cause the system to panic: === [ 79.917682] BUG: unable to handle page fault for address: fffe [ 79.924558] #PF: supervisor read access in kernel mode [ 79.929696] #PF: