Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-08-01 Thread David Hildenbrand
On 01.08.19 10:27, Michal Hocko wrote: > On Thu 01-08-19 09:00:45, David Hildenbrand wrote: >> On 01.08.19 08:13, Michal Hocko wrote: >>> On Wed 31-07-19 16:43:58, David Hildenbrand wrote: On 31.07.19 16:37, Michal Hocko wrote: > On Wed 31-07-19 16:21:46, David Hildenbrand wrote: > [..

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-08-01 Thread Michal Hocko
On Thu 01-08-19 09:00:45, David Hildenbrand wrote: > On 01.08.19 08:13, Michal Hocko wrote: > > On Wed 31-07-19 16:43:58, David Hildenbrand wrote: > >> On 31.07.19 16:37, Michal Hocko wrote: > >>> On Wed 31-07-19 16:21:46, David Hildenbrand wrote: > >>> [...] > > Thinking about it some more, I

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-08-01 Thread David Hildenbrand
On 01.08.19 08:13, Michal Hocko wrote: > On Wed 31-07-19 16:43:58, David Hildenbrand wrote: >> On 31.07.19 16:37, Michal Hocko wrote: >>> On Wed 31-07-19 16:21:46, David Hildenbrand wrote: >>> [...] > Thinking about it some more, I believe that we can reasonably provide > both APIs controla

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 22:57, Andrew Morton wrote: > On Wed, 31 Jul 2019 14:22:13 +0200 David Hildenbrand wrote: > >> Each memory block spans the same amount of sections/pages/bytes. The size >> is determined before the first memory block is created. No need to store >> what we can easily calculate - and th

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 16:43:58, David Hildenbrand wrote: > On 31.07.19 16:37, Michal Hocko wrote: > > On Wed 31-07-19 16:21:46, David Hildenbrand wrote: > > [...] > >>> Thinking about it some more, I believe that we can reasonably provide > >>> both APIs controlable by a command line parameter for backwa

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Andrew Morton
On Wed, 31 Jul 2019 14:22:13 +0200 David Hildenbrand wrote: > Each memory block spans the same amount of sections/pages/bytes. The size > is determined before the first memory block is created. No need to store > what we can easily calculate - and the calculations even look simpler now. > > Whil

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:37, Michal Hocko wrote: > On Wed 31-07-19 16:21:46, David Hildenbrand wrote: > [...] >>> Thinking about it some more, I believe that we can reasonably provide >>> both APIs controlable by a command line parameter for backwards >>> compatibility. It is the hotplug code to control sysf

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 16:21:46, David Hildenbrand wrote: [...] > > Thinking about it some more, I believe that we can reasonably provide > > both APIs controlable by a command line parameter for backwards > > compatibility. It is the hotplug code to control sysfs APIs. E.g. > > create one sysfs entry pe

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:15, Michal Hocko wrote: > On Wed 31-07-19 16:04:10, David Hildenbrand wrote: >> On 31.07.19 15:42, David Hildenbrand wrote: > [...] >>> Powerpc userspace queries it: >>> https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ >> >> FWIW, powerpc-utils also

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 16:14, Michal Hocko wrote: > On Wed 31-07-19 15:42:53, David Hildenbrand wrote: >> On 31.07.19 15:25, Michal Hocko wrote: > [...] >>> I know we have documented this as an ABI and it is really _sad_ that >>> this ABI didn't get through normal scrutiny any user visible interface >>> shoul

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 16:04:10, David Hildenbrand wrote: > On 31.07.19 15:42, David Hildenbrand wrote: [...] > > Powerpc userspace queries it: > > https://groups.google.com/forum/#!msg/powerpc-utils-devel/dKjZCqpTxus/AwkstV2ABwAJ > > FWIW, powerpc-utils also uses the "removable" property - which means >

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 15:42:53, David Hildenbrand wrote: > On 31.07.19 15:25, Michal Hocko wrote: [...] > > I know we have documented this as an ABI and it is really _sad_ that > > this ABI didn't get through normal scrutiny any user visible interface > > should go through but these are sins of the past.

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 15:42, David Hildenbrand wrote: > On 31.07.19 15:25, Michal Hocko wrote: >> On Wed 31-07-19 15:12:12, David Hildenbrand wrote: >>> On 31.07.19 14:43, Michal Hocko wrote: On Wed 31-07-19 14:22:13, David Hildenbrand wrote: > Each memory block spans the same amount of sections/pag

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 15:25, Michal Hocko wrote: > On Wed 31-07-19 15:12:12, David Hildenbrand wrote: >> On 31.07.19 14:43, Michal Hocko wrote: >>> On Wed 31-07-19 14:22:13, David Hildenbrand wrote: Each memory block spans the same amount of sections/pages/bytes. The size is determined before the f

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 15:12:12, David Hildenbrand wrote: > On 31.07.19 14:43, Michal Hocko wrote: > > On Wed 31-07-19 14:22:13, David Hildenbrand wrote: > >> Each memory block spans the same amount of sections/pages/bytes. The size > >> is determined before the first memory block is created. No need to s

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
On 31.07.19 14:43, Michal Hocko wrote: > On Wed 31-07-19 14:22:13, David Hildenbrand wrote: >> Each memory block spans the same amount of sections/pages/bytes. The size >> is determined before the first memory block is created. No need to store >> what we can easily calculate - and the calculations

Re: [PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread Michal Hocko
On Wed 31-07-19 14:22:13, David Hildenbrand wrote: > Each memory block spans the same amount of sections/pages/bytes. The size > is determined before the first memory block is created. No need to store > what we can easily calculate - and the calculations even look simpler now. While this cleanup

[PATCH v1] drivers/base/memory.c: Don't store end_section_nr in memory blocks

2019-07-31 Thread David Hildenbrand
Each memory block spans the same amount of sections/pages/bytes. The size is determined before the first memory block is created. No need to store what we can easily calculate - and the calculations even look simpler now. While at it, fix the variable naming in register_mem_sect_under_node() - we