Re: [PATCH] Fix explanation of lower bits in the SPARSEMEM mem_map pointer

2018-01-24 Thread Petr Tesarik
On Wed, 24 Jan 2018 13:43:53 +0100 Michal Hocko wrote: > On Fri 19-01-18 14:21:33, Petr Tesarik wrote: > > On Fri, 19 Jan 2018 13:39:56 +0100 > > Michal Hocko wrote: > > > > > On Fri 19-01-18 08:09:08, Petr Tesarik wrote: > > > [...] > > > > diff --git a/include/linux/mmzone.h b/include/lin

Re: [PATCH] Fix explanation of lower bits in the SPARSEMEM mem_map pointer

2018-01-24 Thread Michal Hocko
On Fri 19-01-18 14:21:33, Petr Tesarik wrote: > On Fri, 19 Jan 2018 13:39:56 +0100 > Michal Hocko wrote: > > > On Fri 19-01-18 08:09:08, Petr Tesarik wrote: > > [...] > > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > > index 67f2e3c38939..7522a6987595 100644 > > > --- a/inclu

Re: [PATCH] Fix explanation of lower bits in the SPARSEMEM mem_map pointer

2018-01-19 Thread Petr Tesarik
On Fri, 19 Jan 2018 13:39:56 +0100 Michal Hocko wrote: > On Fri 19-01-18 08:09:08, Petr Tesarik wrote: > [...] > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > index 67f2e3c38939..7522a6987595 100644 > > --- a/include/linux/mmzone.h > > +++ b/include/linux/mmzone.h > > @@ -116

Re: [PATCH] Fix explanation of lower bits in the SPARSEMEM mem_map pointer

2018-01-19 Thread Michal Hocko
On Fri 19-01-18 08:09:08, Petr Tesarik wrote: [...] > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 67f2e3c38939..7522a6987595 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -1166,8 +1166,16 @@ extern unsigned long usemap_size(void); > > /* > *

[PATCH] Fix explanation of lower bits in the SPARSEMEM mem_map pointer

2018-01-18 Thread Petr Tesarik
The comment is confusing. On the one hand, it refers to 32-bit alignment (struct page alignment on 32-bit platforms), but this would only guarantee that the 2 lowest bits must be zero. On the other hand, it claims that at least 3 bits are available, and 3 bits are actually used. This is not broken