Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Mike Rapoport
On Fri, Jul 10, 2020 at 05:57:46PM +0100, Matthew Wilcox wrote: > On Fri, Jul 10, 2020 at 12:40:37PM -0400, Andrea Arcangeli wrote: > > Hello Hugh and Mike, > > > > On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > > > Adding Andrea to Cc, he's the one who structured it that way, >

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Andrea Arcangeli
On Fri, Jul 10, 2020 at 05:57:46PM +0100, Matthew Wilcox wrote: > btw, using the hpage_ prefix already caused one problem in the hugetlb > code: > > https://lore.kernel.org/linux-mm/20200629185003.97202-1-mike.krav...@oracle.com/ > > I'd suggest we rename these to THP_PMD_* and THP_PUD_* to make

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Matthew Wilcox
On Fri, Jul 10, 2020 at 12:40:37PM -0400, Andrea Arcangeli wrote: > Hello Hugh and Mike, > > On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > > Adding Andrea to Cc, he's the one who structured it that way, > > and should be consulted. > > > > I'm ambivalent myself. Many's the time

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Andrea Arcangeli
Hello Hugh and Mike, On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > Adding Andrea to Cc, he's the one who structured it that way, > and should be consulted. > > I'm ambivalent myself. Many's the time I've been irritated by the > BUILD_BUG() in HPAGE_etc, and it's responsible for

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-07 Thread Mike Rapoport
Hi Hugh, On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > On Mon, 6 Jul 2020, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The definitions of shift, mask and size for the second and the third level > > of the leaf pages are available only when CONFIG_TRANSPARENT_HUGEPAGE

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-06 Thread Hugh Dickins
On Mon, 6 Jul 2020, Mike Rapoport wrote: > From: Mike Rapoport > > The definitions of shift, mask and size for the second and the third level > of the leaf pages are available only when CONFIG_TRANSPARENT_HUGEPAGE is > set. Otherwise they evaluate to BUILD_BUG(). > > There is no explanation